name: Kettle
products:
  - id: il4ofqon04yai1xe
    manufacturer: Silvercrest
    model: WK0828RT
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
          - dps_val: null
            value: electric
            hidden: true
      - id: 2
        type: integer
        name: current_temperature
      - id: 8
        type: integer
        name: temperature
        unit: C
        range:
          min: 40
          max: 100
        mapping:
          - step: 5
      # One of these unknowns should be the "16 preset programs".
      # Both are numeric strings (so probably enums)
      - id: 15
        type: string
        name: unknown_15
      - id: 16
        type: string
        name: unknown_16
      - id: 103
        type: boolean
        name: unknown_103
      - id: 104
        type: integer
        name: unknown_104
  - entity: switch
    name: Keep warm
    icon: "mdi:kettle-steam"
    dps:
      - id: 13
        type: boolean
        optional: true
        name: switch
        mapping:
          - dps_val: null
            value: false
            hidden: true
  # Portal docs say there is a number to set, and also a countdown remaining.
  # This might be the remaining (log was 5, which is not a 30 minute step)
  # with the other unknown string above a 0/30/60/90/120 selection
  - entity: number
    name: Warm time
    category: config
    class: duration
    translation_key: timer
    dps:
      - id: 14
        type: integer
        name: value
        unit: min
        optional: true
        range:
          min: 0
          max: 120
        mapping:
          - step: 30
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 18
        type: integer
        name: sensor
        unit: min
        optional: true
