name: Irrigation system
products:
  - id: 2ak7r2culspkc7hx
    name: Aubess RainPoint TTP106W
primary_entity:
  entity: valve
  class: water
  dps:
    - id: 1
      name: valve
      type: boolean
secondary_entities:
  - entity: switch
    icon: "mdi:pipe-valve"
    deprecated: valve
    category: config
    dps:
      - id: 1
        name: switch
        type: boolean
  - entity: sensor
    name: Status
    class: enum
    category: diagnostic
    dps:
      - id: 106
        name: sensor
        type: string
        mapping:
          - dps_val: "0"
            value: Unknown
          - dps_val: "1"
            value: Idle
          - dps_val: "2"
            value: Auto running
          - dps_val: "3"
            value: Manually running
  - entity: switch
    name: Auto run
    icon: "mdi:timer"
    category: config
    dps:
      - id: 109
        name: switch
        type: boolean
        optional: true
  - entity: number
    name: Duration
    icon: "mdi:timer"
    category: config
    mode: box
    dps:
      - id: 102
        type: integer
        name: value
        unit: s
        range:
          min: 6
          max: 1440
  - entity: number
    name: Interval
    icon: "mdi:clock-outline"
    category: config
    mode: box
    dps:
      - id: 103
        type: integer
        name: value
        unit: h
        range:
          min: 1
          max: 720
  - entity: sensor
    name: Next irrigation
    icon: "mdi:clock-outline"
    category: diagnostic
    class: duration
    dps:
      - id: 107
        type: integer
        name: sensor
        unit: s
  - entity: sensor
    category: diagnostic
    class: duration
    translation_key: time_remaining
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: s
  - entity: sensor
    class: battery
    category: diagnostic
    dps:
      - id: 108
        type: integer
        name: sensor
        unit: "%"
        mapping:
          - scale: 0.04
  - entity: binary_sensor
    category: diagnostic
    class: problem
    dps:
      - id: 105
        name: sensor
        type: integer
        mapping:
          - dps_val: 0
            value: false
          - value: true
