name: Heater
products:
  - id: jgoifsweogzlfr16
    manufacturer: Cecotec
    model: ReadyWarm 2000 Max Box Ceramic Connected
entities:
  - entity: climate
    translation_key: heater
    dps:
      - id: 1
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            constraint: preset_mode
            conditions:
              - dps_val: CF
                value: heat
              - dps_val: P2
                value: auto
              - dps_val: ST
                value: "off"
                hidden: true
              - dps_val: [EC, AF]
                value: heat
                hidden: true
              - dps_val: [P2, P3]
                value: auto
                hidden: true
      - id: 2
        type: integer
        name: temperature
        unit: C
        range:
          min: 1
          max: 35
        mapping:
          - constraint: preset_mode
            conditions:
              - dps_val: AF
                value: 7
                range:
                  min: 7
                  max: 7
      - id: 3
        type: integer
        name: current_temperature
      - id: 4
        type: string
        name: preset_mode
        mapping:
          - dps_val: CF
            value: comfort
          - dps_val: EC
            value: eco
          - dps_val: P1
            value: program_1
          - dps_val: P2
            value: program_2
          - dps_val: P3
            value: program_3
          - dps_val: AF
            value: away
          - dps_val: ST
            value: standby
      - id: 11
        type: string
        name: hvac_action
        mapping:
          - dps_val: working
            value: heating
          - dps_val: standby
            value: idle
      - id: 101
        type: string
        name: fan_mode
        mapping:
          - dps_val: H1
            value: low
          - dps_val: H2
            value: high
          - dps_val: H0
            value: "off"
  - entity: select
    translation_key: timer
    category: config
    dps:
      - id: 19
        type: string
        name: option
        mapping:
          - dps_val: cancel
            value: cancel
          - dps_val: "1h"
            value: "1h"
          - dps_val: "2h"
            value: "2h"
          - dps_val: "3h"
            value: "3h"
          - dps_val: "4h"
            value: "4h"
          - dps_val: "5h"
            value: "5h"
          - dps_val: "6h"
            value: "6h"
          - dps_val: "7h"
            value: "7h"
          - dps_val: "8h"
            value: "8h"
          - dps_val: "9h"
            value: "9h"
  - entity: sensor
    translation_key: time_remaining
    class: duration
    category: diagnostic
    dps:
      - id: 20
        type: integer
        name: sensor
        unit: min
        class: measurement
  - entity: text
    translation_key: schedule
    category: config
    hidden: true
    dps:
      - id: 26
        type: base64
        optional: true
        name: value
  - entity: switch
    translation_key: sleep
    icon: "mdi:sleep"
    category: config
    dps:
      - id: 103
        type: boolean
        optional: true
        name: switch
  - entity: switch
    name: Open window detection
    icon: "mdi:window-open-variant"
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch
  - entity: binary_sensor
    class: window
    category: diagnostic
    dps:
      - id: 105
        type: boolean
        name: sensor
  - entity: number
    translation_key: temperature_calibration
    category: config
    dps:
      - id: 106
        type: integer
        optional: true
        name: value
        unit: C
        range:
          min: 0
          max: 40
          # doc says unscaled, but that is unlikely
