name: Relay switch
products:
  - id: 1aegphq4yfd50e6b
    name: 1-433
  - id: fugkn1vkc53nvo1s
    name: 1 Gang WiFi Smart Relay
primary_entity:
  entity: switch
  dps:
    - id: 1
      type: boolean
      name: switch
    - id: 42
      type: string
      name: random_time
    - id: 43
      type: string
      name: cycle_time
    - id: 49
      name: add_remote
      type: string
      optional: true
    - id: 50
      name: list_remote
      type: string
      optional: true
secondary_entities:
  - entity: number
    translation_key: timer
    category: config
    dps:
      - id: 9
        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: "off"
            value: "off"
          - dps_val: "on"
            value: "on"
          - dps_val: memory
            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: sync
          - dps_val: button
            value: button
  - entity: switch
    name: Inching
    category: config
    icon: "mdi:reload"
    dps:
      - id: 44
        type: base64
        name: switch
        mapping:
          - mask: FF0000
          - dps_val: 0
            value: false
            mask: FF0000
          - dps_val: 1
            value: true
            mask: FF0000
  - entity: number
    name: Inching duration
    category: config
    icon: "mdi:reload"
    dps:
      - id: 44
        type: base64
        name: value
        unit: s
        range:
          min: 0
          max: 3600
        mapping:
          - mask: 00FFFF
