name: Water sprinkler
products:
  - id: nxquc5lb
    model: SOP10
entities:
  - entity: valve
    class: water
    dps:
      - id: 1
        type: boolean
        name: valve
      - id: 12
        type: string
        name: work_state
  - 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
    class: battery
    dps:
      - id: 7
        type: integer
        name: sensor
        unit: "%"
        class: measurement
  - entity: sensor
    name: Total use time
    class: duration
    category: diagnostic
    dps:
      - id: 9
        type: integer
        name: sensor
        unit: s
        class: measurement
  - entity: select
    name: Weather delay
    icon: "mdi:weather-cloudy-clock"
    translation_key: timer
    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
    translation_key: timer
    category: config
    dps:
      - id: 11
        type: integer
        name: second
        range:
          min: 0
          max: 86400
      - id: 16
        type: string
        name: cycle_timer
        optional: true
      - id: 17
        type: string
        name: schedule
        optional: true
  - entity: sensor
    name: Weather
    icon: "mdi:weather-cloudy-alert"
    class: enum
    dps:
      - id: 13
        type: string
        name: sensor
        optional: true
        mapping:
          - dps_val: null
            value: no_forecast
          - dps_val: sunny
            value: sunny
            icon: "mdi:weather-sunny"
          - dps_val: cloudy
            value: cloudy
            icon: "mdi:weather-cloudy"
          - dps_val: rainy
            value: rainy
            icon: "mdi:weather-rainy"
  - entity: switch
    name: Weather
    icon: "mdi:weather-partly-cloudy"
    category: config
    dps:
      - id: 14
        type: boolean
        name: switch
  - entity: sensor
    name: Last use time
    class: duration
    category: diagnostic
    dps:
      - id: 15
        type: integer
        name: sensor
        unit: s
        class: measurement
