name: Water heater
products:
  - id: 7lkpskrohoygvb8y
    name: Koi Duo HTW-TD-080
primary_entity:
  entity: water_heater
  dps:
    - id: 1
      type: boolean
      name: away
      mapping:
        - dps_val: true
          value: false
        - dps_val: false
          value: true
    - id: 2
      type: string
      name: operation_mode
      mapping:
        - dps_val: jiheat
          value: performance
        - dps_val: maneco
          value: eco
    - id: 9
      type: integer
      name: temperature
      unit: C
      range:
        min: 40
        max: 80
      mapping:
        - step: 10
    - id: 10
      type: integer
      name: current_temperature
secondary_entities:
  - entity: sensor
    class: energy
    dps:
      - id: 12
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
  - entity: sensor
    name: Status
    class: enum
    dps:
      - id: 13
        type: string
        name: sensor
        mapping:
          - dps_val: standby
            value: standby
          - dps_val: heating
            value: heating
          - dps_val: warm
            value: keeping_warm
          - dps_val: yuyueing
            value: reserve_only
  - entity: sensor
    name: Remaining hot water
    category: diagnostic
    dps:
      - id: 14
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 20
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 20
        type: bitfield
        name: fault_code
