name: Refrigerator thermometer
products:
  - id: rfiojakzjdjmgyrz
    manufacturer: Chtoocy
    model: MC82
entities:
  - entity: sensor
    class: temperature
    dps:
      - id: 1
        type: integer
        name: sensor
        mapping:
          - scale: 10
        unit: C

  - entity: binary_sensor
    name: Alarm
    class: problem
    dps:
      - id: 14
        type: string
        name: sensor
        mapping:
          - dps_val: cancel
            value: false
          - dps_val: alarm
            value: true

  - entity: number
    translation_key: maximum_temperature
    class: temperature
    category: config
    dps:
      - id: 10
        type: integer
        name: value
        unit: C
        range:
          min: -400
          max: 1000
        mapping:
          - scale: 10

  - entity: number
    translation_key: minimum_temperature
    class: temperature
    category: config
    dps:
      - id: 11
        type: integer
        name: value
        unit: C
        range:
          min: -400
          max: 1000
        mapping:
          - scale: 10

  - entity: number
    name: Alarm delay
    category: config
    class: duration
    dps:
      - id: 108
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 10

  - entity: number
    name: Alarm duration
    category: config
    class: duration
    dps:
      - id: 106
        type: integer
        name: value
        unit: min
        range:
          min: 1
          max: 10

  - entity: select
    name: Alarm repeat
    translation_key: timer
    category: config
    dps:
      - id: 105
        type: string
        name: option
        mapping:
          - 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
          - dps_val: 10h
            value: 10h
          - dps_val: 11h
            value: 11h
          - dps_val: 12h
            value: 12h

  - entity: number
    name: Report interval
    category: config
    class: duration
    dps:
      - id: 17
        type: integer
        name: value
        unit: h

  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 102
        type: string
        name: option
        mapping:
          - dps_val: c
            value: celsius
          - dps_val: f
            value: fahrenheit

  - entity: switch
    translation_key: sound
    category: config
    dps:
      - id: 103
        type: boolean
        name: switch

  - entity: switch
    name: App push notifications
    category: config
    dps:
      - id: 104
        type: boolean
        name: switch

  - entity: number
    name: Sampling interval
    category: config
    class: duration
    dps:
      - id: 6
        type: integer
        name: value
        unit: min

  - entity: switch
    name: Master alarm
    category: config
    dps:
      - id: 111
        type: boolean
        name: switch

  - entity: button
    name: Force update
    category: config
    dps:
      - id: 107
        type: boolean
        name: button
