name: Dual switch
products:
  - id: keyjnuy4s3kre7m7
    name: LoraTap RR620W-JL
primary_entity:
  entity: switch
  name: Switch 1
  dps:
    - id: 1
      name: switch
      type: boolean
secondary_entities:
  - entity: switch
    name: Switch 2
    dps:
      - id: 2
        name: switch
        type: boolean
  - entity: number
    name: Timer 1
    translation_key: timer
    category: config
    dps:
      - id: 9
        name: value
        type: integer
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
      - id: 42
        name: random_time
        type: string
      - id: 43
        name: cycle_time
        type: string
  - entity: number
    name: Timer 2
    translation_key: timer
    category: config
    dps:
      - id: 10
        type: integer
        name: value
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: select
    translation_key: initial_state
    category: config
    dps:
      - id: 38
        type: string
        name: option
        mapping:
          - dps_val: "0"
            value: "off"
          - dps_val: "1"
            value: "on"
          - dps_val: "2"
            value: memory
  - entity: select
    name: Switch type
    icon: "mdi:toggle-switch"
    category: config
    dps:
      - id: 47
        type: string
        name: option
        mapping:
          - dps_val: flip
            value: Flip
          - dps_val: sync
            value: Synchronized
          - dps_val: button
            value: Button
  - entity: sensor
    name: Energy
    category: diagnostic
    dps:
      - id: 20
        name: sensor
        type: integer
        optional: true
        unit: kWh
        mapping:
          - scale: 1000
  - entity: sensor
    class: current
    category: diagnostic
    dps:
      - id: 21
        name: sensor
        type: integer
        class: measurement
        optional: true
        force: true
        unit: mA
  - entity: sensor
    class: power
    category: diagnostic
    dps:
      - id: 22
        name: sensor
        type: integer
        class: measurement
        optional: true
        force: true
        unit: W
        mapping:
          - scale: 10
  - entity: sensor
    class: voltage
    category: diagnostic
    dps:
      - id: 23
        name: sensor
        type: integer
        optional: true
        force: true
        class: measurement
        unit: V
        mapping:
          - scale: 10
