name: Floor heating
products:
  - id: bjslorwheecpjepj
    manufacturer: DunWore
    model: F60
entities:
  - entity: climate
    translation_key: thermostat
    dps:
      - id: 1
        type: boolean
        name: hvac_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: heat
      - id: 2
        type: string
        name: preset_mode
        mapping:
          - dps_val: auto
            value: program
          - dps_val: comfort
            value: comfort
          - dps_val: eco
            value: eco
          - dps_val: holi
            value: away
      - id: 3
        type: string
        name: hvac_action
        mapping:
          - dps_val: heating
            value: heating
          - dps_val: standby
            value: idle
      - id: 16
        type: integer
        name: temperature
        range:
          min: 41
          max: 400
        mapping:
          - constraint: temperature_unit
            conditions:
              - dps_val: f
                value_redirect: temp_set_f
                range:
                  min: 41
                  max: 104
              - dps_val: c
                scale: 10
                range:
                  min: 50
                  max: 400
      - id: 17
        type: integer
        name: temp_set_f
        hidden: true
        range:
          min: 41
          max: 104
      - id: 23
        type: string
        name: temperature_unit
        mapping:
          - dps_val: c
            value: C
          - dps_val: f
            value: F
      - id: 24
        type: integer
        name: current_temperature
        mapping:
          - scale: 10
            constraint: temperature_unit
            conditions:
              - dps_val: f
                value_redirect: temp_cur_f
      - id: 29
        type: integer
        name: temp_cur_f
        hidden: true
  - entity: switch
    name: Open window detection
    category: config
    dps:
      - id: 8
        type: boolean
        name: switch
  - entity: switch
    translation_key: anti_frost
    category: config
    dps:
      - id: 10
        type: boolean
        name: switch
  - entity: switch
    name: Adaptive start
    category: config
    dps:
      - id: 11
        type: boolean
        name: switch
  - entity: number
    class: temperature
    name: Floor temperature limit
    category: config
    dps:
      - id: 18
        type: integer
        name: upper_temp_f
        hidden: true
        range:
          min: 41
          max: 140
      - id: 19
        type: integer
        name: value
        range:
          min: 41
          max: 600
        mapping:
          - constraint: unit
            conditions:
              - dps_val: f
                value_redirect: upper_temp_f
              - dps_val: c
                range:
                  min: 50
                  max: 600
                scale: 10
                step: 5
      - id: 23
        type: string
        name: unit
        mapping:
          - dps_val: f
            value: F
          - dps_val: c
            value: C
  - entity: select
    name: Sensor type
    icon: "mdi:thermometer-lines"
    category: config
    dps:
      - id: 21
        type: string
        name: option
        mapping:
          - dps_val: "10k"
            value: "10k NTC"
          - dps_val: "12k"
            value: "12k NTC"
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 23
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit
  - entity: select
    name: Schedule
    icon: "mdi:calendar-range"
    category: config
    dps:
      - id: 31
        type: string
        name: option
        mapping:
          - dps_val: "7"
            value: Daily
          - dps_val: "5_1_1"
            value: Weekdays+Sat+Sun
      - id: 107
        type: string
        optional: true
        name: week_1
      - id: 109
        type: string
        optional: true
        name: week_3
      - id: 110
        type: string
        optional: true
        name: week_4
      - id: 111
        type: string
        optional: true
        name: week_5
      - id: 112
        type: string
        optional: true
        name: week_6
      - id: 113
        type: string
        optional: true
        name: week_7
  - entity: number
    name: Holidays
    class: duration
    category: config
    icon: "mdi:calendar-start"
    dps:
      - id: 33
        type: integer
        name: value
        unit: d
        range:
          min: 0
          max: 60
  - entity: button
    translation_key: factory_reset
    category: config
    dps:
      - id: 39
        type: boolean
        name: button
  - entity: lock
    translation_key: child_lock
    category: config
    dps:
      - id: 40
        type: boolean
        name: lock
  - entity: select
    name: Temperature sensor
    icon: "mdi:home-thermometer"
    category: config
    dps:
      - id: 43
        type: string
        name: option
        mapping:
          - dps_val: both
            value: Both
          - dps_val: room
            value: Room
          - dps_val: floor
            value: Floor
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 45
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 45
        type: bitfield
        name: fault_code
  - entity: sensor
    class: power
    category: diagnostic
    dps:
      - id: 101
        type: integer
        name: sensor
        unit: W
        class: measurement
  - entity: sensor
    class: energy
    category: diagnostic
    dps:
      - id: 102
        type: integer
        name: sensor
        unit: kWh
        class: total_increasing
  - entity: number
    name: Room calibration
    category: config
    icon: "mdi:thermometer-check"
    dps:
      - id: 103
        type: integer
        name: value
        unit: °
        range:
          min: -50
          max: 50
        mapping:
          - constraint: temp_unit
            conditions:
              - dps_val: f
                value_redirect: cali_room_f
                range:
                  min: -9
                  max: 9
              - dps_val: c
                scale: 10
                step: 5
      - id: 23
        type: string
        name: temp_unit
        hidden: true
      - id: 104
        type: integer
        optional: true
        name: cali_room_f
        hidden: true
        range:
          min: -9
          max: 9
  - entity: number
    name: Floor calibration
    category: config
    icon: "mdi:thermometer-check"
    dps:
      - id: 105
        type: integer
        name: value
        unit: °
        range:
          min: -50
          max: 50
        mapping:
          - constraint: temp_unit
            conditions:
              - dps_val: f
                value_redirect: cali_floor_f
                range:
                  min: -9
                  max: 9
              - dps_val: c
                scale: 10
                step: 5
      - id: 23
        type: string
        name: temp_unit
        hidden: true
      - id: 106
        type: integer
        name: cali_floor_f
        optional: true
        hidden: true
        range:
          min: -9
          max: 9
  - entity: select
    name: Temperature hysteresis
    icon: "mdi:thermometer-plus"
    category: config
    dps:
      - id: 114
        type: string
        name: option
        mapping:
          - dps_val: A
            value: "0.5°"
          - dps_val: B
            value: "1°"
          - dps_val: C
            value: "2°"
          - dps_val: D
            value: "3°"
