name: Dual switch
products:
  - id: keyjnuy4s3kre7m7
    manufacturer: LoraTap
    model: RR620W-JL
entities:
  - entity: switch
    translation_key: switch_x
    translation_placeholders:
      x: "1"
    dps:
      - id: 1
        name: switch
        type: boolean
  - entity: switch
    translation_key: switch_x
    translation_placeholders:
      x: "2"
    dps:
      - id: 2
        name: switch
        type: boolean
  - entity: time
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    category: config
    dps:
      - id: 9
        name: second
        type: integer
        range:
          min: 0
          max: 86400
      - id: 42
        name: random_time
        type: string
      - id: 43
        name: cycle_time
        type: string
  - entity: time
    translation_key: timer_x
    translation_placeholders:
      x: "2"
    category: config
    dps:
      - id: 10
        type: integer
        name: second
        range:
          min: 0
          max: 86400
  - entity: number
    class: duration
    # 2025-07-20
    deprecated: time.timer_1
    translation_key: timer_x
    translation_placeholders:
      x: "1"
    category: config
    dps:
      - id: 9
        name: value
        type: integer
        unit: min
        range:
          min: 0
          max: 86400
        mapping:
          - scale: 60
            step: 60
  - entity: number
    class: duration
    # 2025-07-20
    deprecated: time.timer_2
    translation_key: timer_x
    translation_placeholders:
      x: "2"
    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
    hidden: true
    dps:
      - id: 20
        name: sensor
        type: integer
        optional: true
        class: measurement
        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
