# "11": 100,     battery

# Valve 1:
#   "105": boolean,                   switch
#   "106": 0 - 1440,                  countdown (m)
#   "111": 0 - 86400,                 last run time (s)
#   "112": "manual", "auto", "idle",  operation mode
#   "117": "OFF", 1 - 7,              weather delay (d)

# Valve 2:
#   "104": boolean,                   switch
#   "103": 0 - 1440,                  countdown (m)
#   "110": 0 - 86400,                 last run time (s)
#   "113": "manual", "auto", "idle",  operation mode
#   "114": "OFF", 1 - 7,              weather delay (d)

name: Dual water timer
products:
  - id: fdrbxxbg
    manufacturer: Diivoo
    model: WT-05
  - id: jntxv3q4
    manufacturer: Insoma
    model: YZD02B,SGW02MB,SGW08MB
  - id: qycalacn
    manufacturer: Yohgee
entities:
  - entity: valve
    class: water
    name: Valve 1
    dps:
      - id: 105
        type: boolean
        name: valve
  - entity: valve
    class: water
    name: Valve 2
    dps:
      - id: 104
        type: boolean
        name: valve
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 11
        type: integer
        name: sensor
        unit: "%"
  - entity: sensor
    name: Operation 1
    category: diagnostic
    dps:
      - id: 113
        type: string
        optional: true
        name: sensor
  - entity: sensor
    name: Operation 2
    category: diagnostic
    dps:
      - id: 112
        type: string
        optional: true
        name: sensor
  - entity: sensor
    name: Last use time 1
    category: diagnostic
    class: duration
    dps:
      - id: 111
        type: integer
        name: sensor
        unit: s
        optional: true
  - entity: sensor
    name: Last use time 2
    category: diagnostic
    class: duration
    dps:
      - id: 110
        type: integer
        name: sensor
        unit: s
        optional: true
  - entity: time
    name: Irrigation time 1
    category: config
    dps:
      - id: 106
        type: integer
        name: minute
        optional: true
        range:
          min: 0
          max: 1440
  - entity: time
    name: Irrigation time 2
    category: config
    dps:
      - id: 103
        type: integer
        name: minute
        optional: true
        range:
          min: 0
          max: 1440
  - entity: select
    name: Weather delay 1
    icon: "mdi:weather-cloudy-clock"
    category: config
    dps:
      - id: 117
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: "OFF"
            value: "Off"
          - dps_val: "1"
            value: "1 day"
          - dps_val: "2"
            value: "2 days"
          - dps_val: "3"
            value: "3 days"
          - dps_val: "3"
            value: "4 days"
          - dps_val: "5"
            value: "5 days"
          - dps_val: "6"
            value: "6 days"
          - dps_val: "7"
            value: "7 days"
  - entity: select
    name: Weather delay 2
    icon: "mdi:weather-cloudy-clock"
    category: config
    dps:
      - id: 114
        type: string
        optional: true
        name: option
        mapping:
          - dps_val: "OFF"
            value: "Off"
          - dps_val: "1"
            value: "1 day"
          - dps_val: "2"
            value: "2 days"
          - dps_val: "3"
            value: "3 days"
          - dps_val: "3"
            value: "4 days"
          - dps_val: "5"
            value: "5 days"
          - dps_val: "6"
            value: "6 days"
          - dps_val: "7"
            value: "7 days"
