name: Water timer valve
legacy_type: ble_johgee_water_valve
products:
  - id: c8800fd30884068f
    manufacturer: Johgee
  - id: bfc513e1f9d4d259a10wzu
    manufacturer: Diivoo
    model: WT-03
  - id: nxquc5lb
    manufacturer: Insoma
    model: SOP10
  - id: so5ybnw9
    manufacturer: Royal Gardineer
    model: BWC-495.bt
entities:
  - entity: valve
    class: water
    dps:
      - id: 1
        type: boolean
        name: valve
      - id: 13
        type: string
        name: weather
        optional: true
      - id: 16
        type: string
        name: soak_schedule
        optional: true
      - id: 17
        type: string
        name: irrigation_schedule
        optional: true
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: "%"
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 4
        type: bitfield
        name: sensor
        optional: true
        mapping:
          - dps_val: 0
            value: false
          - dps_val: null
            value: false
          - value: true
      - id: 4
        type: bitfield
        optional: true
        name: fault_code
  - entity: sensor
    name: Operation
    category: diagnostic
    dps:
      - id: 12
        type: string
        name: sensor
  - entity: sensor
    name: Accumulated use time
    category: diagnostic
    class: duration
    dps:
      - id: 9
        type: integer
        name: sensor
        unit: s
  - entity: sensor
    name: Last use time
    category: diagnostic
    class: duration
    dps:
      - id: 15
        type: integer
        name: sensor
        unit: s
        optional: true
  - entity: select
    name: Weather delay
    translation_key: timer
    icon: "mdi:weather-cloudy-clock"
    category: config
    dps:
      - id: 10
        type: string
        name: option
        mapping:
          - dps_val: cancel
            value: cancel
          - dps_val: "24h"
            value: "24h"
          - dps_val: "48h"
            value: "48h"
          - dps_val: "72h"
            value: "72h"
  - entity: time
    name: Irrigation time
    category: config
    dps:
      - id: 11
        type: integer
        name: second
        optional: true
        range:
          min: 0
          max: 86400
  - entity: switch
    name: Smart weather switch
    icon: "mdi:sun-wireless"
    hidden: unavailable
    category: config
    dps:
      - id: 14
        type: boolean
        name: switch
        optional: true
      - id: 14
        type: boolean
        optional: true
        name: available
        mapping:
          - dps_val: null
            value: false
          - value: true
