name: Setti kettle
products:
  - id: rsygyyeiyarl4urt
    name: Czajnik Setti+ KT950W
primary_entity:
  entity: water_heater
  icon: "mdi:kettle"
  dps:
    - id: 1
      type: boolean
      name: operation_mode
      mapping:
        - dps_val: false
          value: "Off"
        - dps_val: true
          constraint: work_type
          conditions:
            - dps_val: setting_quick
              value: Quick Set
            - dps_val: boiling_quick
              value: Quick Boil
            - dps_val: temp_setting
              value: Set
            - dps_val: temp_boiling
              value: Boil
    - id: 2
      type: integer
      name: current_temperature
      mapping:
        - constraint: temperature_unit
          conditions:
            - dps_val: f
              value_redirect: current_temp_f
    - id: 3
      type: integer
      name: current_temp_f
      hidden: true
    - id: 8
      type: integer
      name: temperature
      range:
        min: 0
        max: 100
      mapping:
        - constraint: temperature_unit
          conditions:
            - dps_val: f
              value_redirect: temp_set_f
              range:
                min: 32
                max: 212
    - id: 9
      type: integer
      name: temp_set_f
      range:
        min: 32
        max: 212
      hidden: true
    - id: 12
      type: string
      name: temperature_unit
      mapping:
        - dps_val: c
          value: C
        - dps_val: f
          value: F
    - id: 16
      type: string
      name: work_type
      hidden: true
    - id: 19
      type: bitfield
      name: fault_code
secondary_entities:
  - entity: select
    name: Quick set temperature C
    icon: "mdi:water-thermometer-outline"
    category: config
    dps:
      - id: 4
        type: string
        name: option
        mapping:
          - constraint: unit
            conditions:
              - dps_val: c
                mapping:
                  - dps_val: '40'
                    value: '40'
                  - dps_val: '85'
                    value: '85'
              - dps_val: f
                invalid: true
      - id: 12
        type: string
        name: unit
  - entity: select
    name: Quick set temperature F
    icon: "mdi:water-thermometer-outline"
    category: config
    dps:
      - id: 5
        type: string
        name: option
        mapping:
          - constraint: unit
            conditions:
              - dps_val: f
                mapping:
                  - dps_val: '104'
                    value: '104'
                  - dps_val: '185'
                    value: '185'
              - dps_val: c
                invalid: true
      - id: 12
        type: string
        name: unit
  - entity: select
    name: Quick boil temperature C
    icon: "mdi:water-thermometer"
    category: config
    dps:
      - id: 6
        type: string
        name: option
        mapping:
          - constraint: unit
            conditions:
              - dps_val: c
                mapping:
                  - dps_val: '40'
                    value: '40'
                  - dps_val: '85'
                    value: '85'
                  - dps_val: '100'
                    value: '100'
              - dps_val: f
                invalid: true
      - id: 12
        type: string
        name: unit
  - entity: select
    name: Quick boil temperature F
    icon: "mdi:water-thermometer"
    category: config
    dps:
      - id: 7
        type: string
        name: option
        mapping:
          - constraint: unit
            conditions:
              - dps_val: f
                mapping:
                  - dps_val: '104'
                    value: '104'
                  - dps_val: '185'
                    value: '185'
                  - dps_val: '212'
                    value: '212'
              - dps_val: c
                invalid: true
      - id: 12
        type: string
        name: unit
  - entity: number
    name: Boil temperature
    category: config
    class: temperature
    icon: "mdi:coolant-temperature"
    dps:
      - id: 10
        type: integer
        name: value
        range:
          min: 0
          max: 100
        mapping:
          - constraint: unit
            conditions:
              - dps_val: f
                value_redirect: temp_boiling_f
                range:
                  min: 32
                  max: 212
      - id: 11
        type: integer
        name: temp_boiling_f
        hidden: true
        range:
          min: 32
          max: 212
      - id: 12
        type: string
        name: unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 12
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: switch
    name: Keep warm
    icon: "mdi:kettle-outline"
    dps:
      - id: 13
        type: boolean
        name: switch
  - entity: number
    name: Keep warm time
    category: config
    icon: "mdi:timer"
    dps:
      - id: 14
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 360
  - entity: sensor
    name: Status
    class: enum
    category: diagnostic
    dps:
      - id: 15
        type: string
        name: sensor
        mapping:
          - dps_val: standby
            value: Standby
            icon: "mdi:kettle-off-outline"
          - dps_val: heating
            icon: "mdi:kettle"
            value: Heating
          - dps_val: cooling
            icon: "mdi:kettle-outline"
            value: Cooling
          - dps_val: warm
            icon: "mdi:kettle"
            value: Warm
          - dps_val: heating_temp
            icon: "mdi:kettle-alert"
            value: "No water"
          - dps_val: boiling_temp
            icon: "mdi:kettle-steam"
            value: Boiling
          - dps_val: reserve_1
            icon: "mdi:kettle-alert"
            value: Reserved1
          - dps_val: reserve_2
            icon: "mdi:kettle-alert"
            value: Reserved2
          - dps_val: reserve_3
            icon: "mdi:kettle-alert"
            value: Reserved3
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 19
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
