name: Siren
products:
  - id: DYgId0sz6zWlmmYu
    name: STL siren alarm
primary_entity:
  entity: siren
  dps:
    - id: 102
      type: string
      name: tone
      mapping:
        - dps_val: "1"
          value: "Alarm 1"
        - dps_val: "2"
          value: "Alarm 2"
        - dps_val: "3"
          value: "Alarm 3"
        - dps_val: "4"
          value: "Alarm 4"
        - dps_val: "5"
          value: "Alarm 5"
        - dps_val: "6"
          value: "Alarm 6"
        - dps_val: "7"
          value: "Alarm 7"
        - dps_val: "8"
          value: "Alarm 8"
        - dps_val: "9"
          value: "Alarm 9"
        - dps_val: "10"
          value: "Alarm 10"
    - id: 103
      type: integer
      name: duration
      range:
        min: 0
        max: 60
    - id: 104
      type: boolean
      optional: true
      name: switch
secondary_entities:
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 101
        type: string
        name: sensor
        unit: "%"
        mapping:
          - dps_val: "0"
            value: 100
          - dps_val: "1"
            value: 75
          - dps_val: "2"
            value: 50
          - dps_val: "3"
            value: 25
          - dps_val: "4"
            value: null
  - entity: binary_sensor
    class: plug
    category: diagnostic
    dps:
      - id: 101
        type: string
        name: sensor
        mapping:
          - dps_val: "4"
            value: true
          - value: false
