name: Ecostrad iQ heating element
primary_entity:
  entity: climate
  translation_only_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: "only_inside"
          value: boost
    - id: 16
      type: integer
      name: temperature
      unit: C
      range:
        min: 70
        max: 300
      mapping:
        - scale: 10
          step: 5
          constraint: preset_mode
          conditions:
            - dps_val: only_inside
              value_redirect: radiator_temperature
              range:
                min: 300
                max: 700
    - id: 24
      type: integer
      name: current_temperature
      mapping:
        - scale: 10
    - id: 57
      type: integer
      name: radiator_temperature
      range:
        min: 300
        max: 700
      mapping:
        - scale: 10
          step: 5
    - id: 110
      type: string
      name: schedule
      optional: true

secondary_entities:
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 40
        type: boolean
        name: lock
  - entity: select
    name: Open window detection
    category: config
    dps:
      - id: 108
        type: string
        name: option
        mapping:
          - dps_val: 0
            value: "Off"
            icon: "mdi:window-closed"
          - dps_val: 60
            value: "60 mins"
            icon: "mdi:window-open"
          - dps_val: 90
            value: "90 mins"
            icon: "mdi:window-open"
  - entity: number
    name: Boost time
    category: config
    dps:
      - id: 111
        type: integer
        name: value
        unit: h
        range:
          min: 0
          max: 7
  - entity: number
    name: Calibration offset
    category: config
    dps:
      - id: 27
        type: integer
        name: value
        range:
          min: -5
          max: 5
