name: Water heater
products:
  - id: nqlqesmkrje7vdhm
    name: EMS Thermal TH200DT heatpump
primary_entity:
  entity: water_heater
  dps:
    - id: 1
      type: boolean
      name: operation_mode
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: mode
          conditions:
            - dps_val: auto
              value: heat_pump
            - dps_val: mix
              value: high_demand
            - dps_val: electric
              value: electric
    - id: 2
      type: integer
      name: temperature
      range:
        min: 10
        max: 70
      unit: C
    - id: 4
      type: string
      name: mode
      hidden: true
    - id: 9
      type: bitfield
      name: fault_code
secondary_entities:
  - entity: sensor
    class: temperature
    dps:
      - id: 3
        type: integer
        name: sensor
        unit: C
        class: measurement
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 9
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
