name: Water heater
products:
  - id: qwbyia2yr5ip9y4v
    manufacturer: Geyserwise
    model: MWS
    name: Solar MPPT Geyser
entities:
  - entity: water_heater
    dps:
      - id: 1
        type: boolean
        name: operation_mode
        mapping:
          - dps_val: false
            value: "off"
          - dps_val: true
            value: electric
      - id: 2
        type: string
        name: away_mode
        mapping:
          - dps_val: Timer
            value: false
          - dps_val: Holiday
            value: true
      - id: 10
        type: integer
        name: current_temperature
      - id: 102
        type: integer
        name: temperature
        unit: C
        range:
          min: 30
          max: 75
  - entity: binary_sensor
    name: Element
    class: running
    category: diagnostic
    dps:
      - id: 13
        type: string
        name: sensor
        mapping:
          - dps_val: "Off"
            value: false
          - dps_val: "On"
            value: true
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 20
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
      - id: 20
        type: bitfield
        name: fault_code
      - id: 20
        type: bitfield
        name: description
        mapping:
          - dps_val: 0
            value: ok
          - dps_val: 1
            value: Over current
          - dps_val: 2
            value: Dry burn
          - dps_val: 4
            value: Wt sensor fault
          - dps_val: 8
            value: Heating loss
          - dps_val: 16
            value: Over temperature
          - dps_val: 32
            value: Water leak
          - dps_val: 64
            value: Comm failure
          - dps_val: 128
            value: Ct probe fault
          - dps_val: 256
            value: Pump failure
  - entity: switch
    name: AC boost
    category: config
    dps:
      - id: 101
        type: boolean
        name: switch
  - entity: number
    name: Overnight temperature
    category: config
    class: temperature
    dps:
      - id: 103
        type: integer
        name: value
        unit: C
        range:
          min: 30
          max: 75
  - entity: number
    name: Morning temperature
    category: config
    class: temperature
    dps:
      - id: 104
        type: integer
        name: value
        unit: C
        range:
          min: 30
          max: 75
  - entity: number
    name: Afternoon temperature
    category: config
    class: temperature
    dps:
      - id: 105
        type: integer
        name: value
        unit: C
        range:
          min: 30
          max: 75
  - entity: number
    name: Evening temperature
    category: config
    class: temperature
    dps:
      - id: 106
        type: integer
        name: value
        unit: C
        range:
          min: 30
          max: 75
  - entity: sensor
    name: Element AC runtime
    category: diagnostic
    class: duration
    dps:
      - id: 107
        type: integer
        name: sensor
        unit: h
  - entity: sensor
    name: Power source
    category: diagnostic
    dps:
      - id: 110
        type: string
        name: sensor
  - entity: sensor
    class: power
    category: diagnostic
    name: AC element power
    dps:
      - id: 108
        type: integer
        name: sensor
        unit: W
        class: measurement
        force: true
        mapping:
          - scale: 10
  - entity: sensor
    class: power
    category: diagnostic
    name: PV power
    dps:
      - id: 113
        type: integer
        name: sensor
        unit: W
        class: measurement
        force: true
        mapping:
          - scale: 10
  - entity: sensor
    class: current
    category: diagnostic
    name: PV current
    dps:
      - id: 112
        type: integer
        name: sensor
        unit: A
        class: measurement
        force: true
        mapping:
          - scale: 10
  - entity: sensor
    class: voltage
    category: diagnostic
    name: PV voltage
    dps:
      - id: 111
        type: integer
        name: sensor
        unit: V
        class: measurement
        force: true
        mapping:
          - scale: 10
