name: Thermostat and hydrostat
products:
  - id: dlsdk5zvkuuhufpy
    manufacturer: Moes
    model: MS-103
entities:
  - entity: switch
    name: Main switch
    category: config
    dps:
      - id: 1
        type: boolean
        name: switch
      - id: 24
        type: string
        name: cycle_time
      - id: 106
        type: string
        # Probe type detection
        name: sensor_dect
  - entity: switch
    translation_key: switch_x
    translation_placeholders:
      x: "1"
    dps:
      - id: 2
        type: boolean
        name: switch
        # Auto rules are in an undocumented encoding, so added as an attribute
      - id: 101
        type: hex
        name: auto_rules
  - entity: switch
    translation_key: switch_x
    translation_placeholders:
      x: "2"
    dps:
      - id: 3
        type: boolean
        name: switch
        # Auto rules are in an undocumented encoding, so added as an attribute
      - id: 102
        type: hex
        name: auto_rules
  - entity: select
    name: Mode
    category: config
    dps:
      - id: 4
        type: string
        name: option
        mapping:
          - dps_val: auto
            value: Auto
          - dps_val: manual
            value: Manual
  - entity: sensor
    class: temperature
    dps:
      - id: 6
        type: integer
        name: sensor
        unit: C
        class: measurement
        mapping:
          - scale: 10
  - entity: number
    name: Temperature calibration
    category: config
    dps:
      - id: 18
        type: integer
        name: value
        range:
          min: -90
          max: 90
        mapping:
          - scale: 10
  - entity: sensor
    class: humidity
    dps:
      - id: 20
        type: integer
        name: sensor
        unit: "%"
        class: measurement
        mapping:
          - scale: 10
  - entity: number
    name: Maximum humidity
    category: config
    class: humidity
    dps:
      - id: 21
        type: integer
        name: value
        unit: "%"
        range:
          min: 0
          max: 1000
        mapping:
          - scale: 10
  - entity: number
    name: Minimum humidity
    category: config
    class: humidity
    dps:
      - id: 22
        type: integer
        name: value
        unit: "%"
        range:
          min: 0
          max: 1000
        mapping:
          - scale: 10
  - entity: time
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    category: config
    dps:
      - id: 103
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: time
    translation_key: timer_x
    translation_placeholders:
      x: "2"
    category: config
    dps:
      - id: 104
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: number
    class: duration
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    # 2025-07-20
    deprecated: time.timer_1
    category: config
    dps:
      - id: 103
        type: integer
        name: value
        unit: s
        range:
          min: 0
          max: 86400
  - entity: number
    class: duration
    translation_key: timer_x
    translation_placeholders:
      x: "2"
    # 2025-07-20
    deprecated: time.timer_2
    category: config
    dps:
      - id: 104
        type: integer
        name: value
        unit: s
        range:
          min: 0
          max: 86400
  - entity: select
    translation_key: initial_state
    category: config
    dps:
      - id: 105
        type: string
        name: option
        mapping:
          - dps_val: "on"
            value: "on"
          - dps_val: "off"
            value: "off"
          - dps_val: memory
            value: memory
  - entity: number
    name: High temperature switch level
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 7
        type: integer
        name: value
        optional: true
        unit: C
        range:
          min: -500
          max: 1100
        mapping:
          - scale: 10
  - entity: switch
    name: High temperature switch
    category: config
    dps:
      - id: 8
        type: boolean
        name: switch
  - entity: number
    name: High temperature alarm level
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-up"
    dps:
      - id: 9
        type: integer
        name: value
        unit: C
        range:
          min: -500
          max: 1100
        mapping:
          - scale: 10
  - entity: number
    name: Low temperature switch level
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-down"
    dps:
      - id: 10
        type: integer
        name: value
        optional: true
        unit: C
        range:
          min: -500
          max: 1100
        mapping:
          - scale: 10
  - entity: switch
    name: Low temperature switch
    category: config
    dps:
      - id: 11
        type: boolean
        name: switch
  - entity: number
    name: Low temperature alarm level
    category: config
    class: temperature
    icon: "mdi:thermometer-chevron-down"
    dps:
      - id: 12
        type: integer
        name: value
        unit: C
        range:
          min: -500
          max: 1100
        mapping:
          - scale: 10
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 19
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: null
            value: false
          - dps_val: 0
            value: false
          - value: true
      - id: 19
        type: bitfield
        optional: true
        name: fault_code
      - id: 19
        type: bitfield
        optional: true
        name: description
        mapping:
          - dps_val: null
            value: OK
          - dps_val: 0
            value: OK
          - dps_val: 1
            value: Cooling fault
          - dps_val: 2
            value: Heating fault
          - dps_val: 4
            value: Temperature diff fault
