name: Water dispenser
products:
  - id: szx3eawxigxumxi5
    manufacturer: Casdon
    model: KG1
    model_id: Y-GX1200-KG1

entities:
  - entity: valve
    class: water
    dps:
      - id: 8
        type: boolean
        name: valve

  - entity: sensor
    translation_key: status
    class: enum
    icon: mdi:cup-water
    dps:
      - id: 5
        type: string
        name: sensor
        mapping:
          - dps_val: standby
            value: standby
          - dps_val: refrigerating
            value: cooling
          - dps_val: drain_water
            value: drain
          - dps_val: drain_normal_water
            value: drain_normal_water
          - dps_val: drain_boiling_water
            value: drain_hot_water
          - dps_val: job_done
            value: done
          - dps_val: coldwater_prohibited
            value: cold_water_unavailable
          - dps_val: reset
            value: resetting
          - dps_val: cleaning
            value: cleaning
          - dps_val: cleaned
            value: cleaned
          - dps_val: empty_device
            value: empty
          - dps_val: emptied
            value: emptied
          - dps_val: drain_cool_water
            value: drain_cold_water
          - dps_val: high_temp_emptying
            value: high_temperature_emptying
          - dps_val: high_temp_emptyed
            value: high_temperature_emptied
          - dps_val: water_shortage
            value: no_water

  - entity: lock
    translation_key: child_lock
    dps:
      - id: 9
        type: boolean
        name: lock

  - entity: switch
    translation_key: auto_clean
    category: config
    dps:
      - id: 11
        type: boolean
        name: switch

  - entity: switch
    translation_key: auto_light
    category: config
    dps:
      - id: 103
        type: boolean
        name: switch

  - entity: number
    class: volume
    dps:
      - id: 101
        type: integer
        name: value
        unit: mL
        range:
          min: 150
          max: 2500
        mapping:
          - step: 50

  - entity: climate
    translation_key: cold_water
    dps:
      - id: 102
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: cool
      - id: 107
        type: integer
        name: temperature
        unit: C
        range:
          min: 8
          max: 15
      - id: 4
        type: integer
        name: current_temperature

  - entity: water_heater
    translation_only_key: hot_water
    dps:
      - id: 12
        type: integer
        name: temperature
        unit: C
        range:
          min: 10
          max: 100
        mapping:
          - step: 5
      - id: 4
        type: integer
        name: current_temperature

  - entity: sensor
    class: volume
    category: diagnostic
    dps:
      - id: 26
        type: integer
        name: sensor
        unit: mL

  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 6
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 6
        type: bitfield
        name: fault_code
