name: Kettle
products:
  - id: aj27apvmobrnf7m0
    manufacturer: Weeket
    model: KES5211TE-CE
entities:
  - entity: water_heater
    translation_key: kettle
    dps:
      - id: 1
        type: boolean
        name: operation_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: electric
      - id: 2
        type: integer
        name: current_temperature
        mapping:
          - constraint: temperature_unit
            conditions:
              - dps_val: f
                value_redirect: temp_cur_f
      - id: 3
        type: integer
        name: temp_cur_f
      - id: 6
        type: string
        name: temperature_unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
      - id: 101
        type: string
        name: temperature
        mapping:
          - constraint: temperature_unit
            conditions:
              - dps_val: c
                value_redirect: temp_set_c
                range:
                  min: 70
                  max: 100
                step: 10
              - dps_val: f
                value_redirect: temp_set_f
                range:
                  min: 158
                  max: 212
                step: 18
      - id: 101
        type: string
        name: temp_set_c
        range:
          min: 70
          max: 100
        mapping:
          - dps_val: "70"
            value: 70
            step: 10
          - dps_val: "80"
            value: 80
            step: 10
          - dps_val: "90"
            value: 90
            step: 10
          - dps_val: "100"
            value: 100
            step: 10
      - id: 102
        type: string
        name: temp_set_f
        range:
          min: 158
          max: 212
        mapping:
          - dps_val: "158"
            value: 158
            step: 18
          - dps_val: "176"
            value: 176
            step: 18
          - dps_val: "194"
            value: 194
            step: 18
          - dps_val: "212"
            value: 212
            step: 18
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 6
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: sensor
    translation_key: status
    class: enum
    dps:
      - id: 8
        type: string
        name: sensor
        mapping:
          - dps_val: standby
            value: standby
          - dps_val: heating
            value: heating
          - dps_val: cooling
            value: cooling
          - dps_val: warm
            value: keeping_warm
  - entity: select
    name: Heating mode
    translation_key: kettle_mode
    dps:
      - id: 9
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: heating_quick
            value: quick_heat
          - dps_val: boiling_quick
            value: quick_boil
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 10
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 10
        type: bitfield
        name: fault_code
  - entity: select
    translation_key: kettle_mode
    category: config
    dps:
      - id: 11
        type: string
        name: option
        mapping:
          - dps_val: diy
            value: custom
          - dps_val: boiled_water
            value: boil
          - dps_val: dechlorination
            value: dechlorinate
          - dps_val: black_tea
            value: black_tea
          - dps_val: coffee
            value: coffee
          - dps_val: green_tea
            value: green_tea
          - dps_val: honey_water
            value: honey_water
          - dps_val: milk_powder
            value: infant_formula
  - entity: switch
    name: Keep warm
    category: config
    dps:
      - id: 14
        type: boolean
        name: switch
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 17
        type: integer
        optional: true
        name: sensor
        unit: min
