name: Irrigation controller
products:
  - id: o4lzusmr4igv5ux3
    manufacturer: KRain
    model: KRX8
entities:
  - entity: switch
    category: config
    dps:
      - id: 1
        type: boolean
        name: switch
  - entity: binary_sensor
    class: running
    icon: "mdi:sprinkler-variant"
    dps:
      - id: 132
        name: sensor
        type: boolean
        optional: true
  - entity: valve
    name: Zone 1
    class: water
    dps:
      - id: 101
        type: boolean
        name: valve
  - entity: valve
    name: Zone 2
    class: water
    dps:
      - id: 102
        type: boolean
        name: valve
  - entity: valve
    name: Zone 3
    class: water
    dps:
      - id: 103
        type: boolean
        name: valve
  - entity: valve
    name: Zone 4
    class: water
    dps:
      - id: 104
        type: boolean
        name: valve
  - entity: valve
    name: Zone 5
    class: water
    dps:
      - id: 105
        type: boolean
        name: valve
  - entity: valve
    name: Zone 6
    class: water
    dps:
      - id: 106
        type: boolean
        name: valve
  - entity: valve
    name: Zone 7
    class: water
    dps:
      - id: 107
        type: boolean
        name: valve
  - entity: valve
    name: Zone 8
    class: water
    dps:
      - id: 108
        type: boolean
        name: valve
  - entity: switch
    name: Program A
    icon: "mdi:timetable"
    category: config
    dps:
      - id: 117
        type: boolean
        name: switch
  - entity: switch
    name: Program B
    icon: "mdi:timetable"
    category: config
    dps:
      - id: 118
        type: boolean
        name: switch
  - entity: switch
    name: Program C
    icon: "mdi:timetable"
    dps:
      - id: 119
        type: boolean
        name: switch
  - entity: switch
    name: Program D
    icon: "mdi:timetable"
    dps:
      - id: 120
        type: boolean
        name: switch
  - entity: switch
    name: Enable programs
    icon: "mdi:calendar-check"
    dps:
      - id: 121
        type: boolean
        name: switch
  - entity: binary_sensor
    class: battery
    dps:
      - id: 130
        name: sensor
        type: boolean
        mapping:
          - dps_val: true
            value: false
          - dps_val: false
            value: true
  - entity: binary_sensor
    class: plug
    dps:
      - id: 131
        name: sensor
        type: boolean
  - entity: switch
    name: Watering delay
    icon: "mdi:weather-pouring"
    category: config
    dps:
      - id: 136
        type: boolean
        name: switch
  - entity: number
    name: Watering delay
    class: duration
    category: config
    icon: "mdi:weather-pouring"
    dps:
      - id: 126
        type: integer
        name: value
        unit: d
        range:
          min: 1
          max: 15
      - id: 136
        type: boolean
        name: available
  - entity: binary_sensor
    name: Rain
    class: moisture
    dps:
      - id: 137
        name: sensor
        type: boolean
  - entity: text
    name: Program
    category: config
    icon: "mdi:timetable"
    hidden: true
    dps:
      - id: 127
        type: base64
        optional: true
        name: value
  - entity: text
    name: Zone config
    category: config
    icon: "mdi:view-grid-outline"
    hidden: true
    dps:
      - id: 128
        type: base64
        optional: true
        name: value
  - entity: text
    name: Date and time
    category: config
    icon: "mdi:calendar-clock"
    hidden: true
    dps:
      - id: 129
        type: base64
        optional: true
        name: value
  - entity: sensor
    name: Watering delay
    class: duration
    category: diagnostic
    dps:
      - id: 134
        type: base64
        mask: "0000FF00"
        name: sensor
        unit: d
        class: measurement
      - id: 134
        type: base64
        name: technical_info
  - entity: text
    name: Manual command
    category: config
    icon: "mdi:account-cog"
    hidden: true
    dps:
      - id: 133
        type: base64
        optional: true
        name: value
