name: Radiator element
products:
  - id: keq3x2tw6plbbipm
    manufacturer: Ecostrad
    model: iQ WiFi Element
entities:
  - entity: climate
    translation_key: thermostat
    dps:
      - id: 1
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: true
            value: "heat"
          - dps_val: false
            value: "off"
      - id: 2
        type: string
        name: preset_mode
        mapping:
          - dps_val: "auto"
            value: program
          - dps_val: "eco"
            value: eco
          - dps_val: "hot"
            value: comfort
          - dps_val: "rad"
            value: boost
      - id: 16
        type: integer
        name: temperature
        unit: C
        range:
          min: 70
          max: 700
        mapping:
          - scale: 10
            step: 5
            range:
              min: 70
              max: 300
            constraint: preset_mode
            conditions:
              - dps_val: "rad"
                value_redirect: radiator_temperature
                range:
                  min: 300
                  max: 700
      - id: 24
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
      - id: 32
        type: string
        name: hvac_action
        mapping:
          - dps_val: heating
            value: heating
          - dps_val: noheat
            value: idle
      - id: 102
        type: integer
        name: radiator_temperature
        range:
          min: 300
          max: 700
        mapping:
          - scale: 10
            step: 50
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 40
        type: boolean
        name: lock
  - entity: number
    translation_key: temperature_calibration
    class: temperature_delta
    category: config
    dps:
      - id: 27
        type: integer
        name: value
        unit: C
        range:
          min: -5
          max: 5
  - entity: select
    name: Open window detection
    translation_key: timer
    category: config
    dps:
      - id: 108
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: cancel
            icon: "mdi:window-closed"
          - dps_val: "60"
            value: "1h"
            icon: "mdi:window-open"
          - dps_val: "90"
            value: "1h30m"
            icon: "mdi:window-open"
  - entity: number
    name: Boost time
    class: duration
    category: config
    dps:
      - id: 111
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 7
