name: Weather station
products:
  - id: q9opgtca8ymbxpqn
    model: EM3378
entities:
  - entity: sensor
    name: Indoor temperature
    class: temperature
    dps:
      - id: 101
        type: integer
        name: sensor
        class: measurement
        mapping:
          - scale: 10
        unit: F
        # we need the full range of values to expose this as a light control
      - id: 118
        name: backlight_brightness
        type: string
      - id: 121
        name: backlight_leading_time
        type: integer
        # below is probably related to the built in USB charger, but is encoded
      - id: 122
        name: output_power
        type: string
  - entity: sensor
    name: Indoor humidity
    class: humidity
    dps:
      - id: 102
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: sensor
    name: Remote temperature 1
    class: temperature
    category: diagnostic
    dps:
      - id: 103
        type: integer
        name: sensor
        class: measurement
        mapping:
          - scale: 10
        unit: F
  - entity: sensor
    name: Remote humidity 1
    class: humidity
    category: diagnostic
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: sensor
    name: Remote temperature 2
    class: temperature
    category: diagnostic
    dps:
      - id: 106
        type: integer
        name: sensor
        class: measurement
        optional: true
        mapping:
          - scale: 10
        unit: F
  - entity: sensor
    name: Remote humidity 2
    class: humidity
    category: diagnostic
    dps:
      - id: 107
        type: integer
        name: sensor
        unit: "%"
        class: measurement
        optional: true
  - entity: sensor
    name: Remote temperature 3
    class: temperature
    category: diagnostic
    dps:
      - id: 108
        type: integer
        name: sensor
        class: measurement
        optional: true
        mapping:
          - scale: 10
        unit: F
  - entity: sensor
    name: Remote humidity 3
    class: humidity
    category: diagnostic
    dps:
      - id: 109
        type: integer
        name: sensor
        unit: "%"
        class: measurement
        optional: true
  - entity: sensor
    class: atmospheric_pressure
    category: diagnostic
    dps:
      - id: 110
        type: integer
        name: sensor
        class: measurement
        unit: hPa
  - entity: select
    name: Atmospheric pressure unit
    icon: "mdi:gauge"
    category: config
    dps:
      - id: 111
        type: string
        name: option
        mapping:
          - dps_val: mmHg
            value: mmHg
          - dps_val: hPa
            value: hPa
          - dps_val: inHg
            value: inHg
  - entity: select
    translation_key: temperature_unit
    category: config
    dps:
      - id: 112
        type: boolean
        name: option
        mapping:
          - dps_val: true
            value: celsius
          - dps_val: false
            value: fahrenheit
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 117
        type: boolean
        name: sensor
        optional: true
        persist: false
        mapping:
          - dps_val: null
            value: false
          - dps_val: 0
            value: false
          - value: true
      - id: 117
        name: fault_code
        type: bitfield
        optional: true
  - entity: select
    name: Time mode
    icon: "mdi:clock-edit"
    category: config
    dps:
      - id: 119
        type: boolean
        name: option
        mapping:
          - dps_val: false
            value: 24h
          - dps_val: true
            value: 12h
  - entity: switch
    name: Date
    category: config
    dps:
      - id: 120
        type: boolean
        name: switch
