name: Water heater
products:
  - id: lci0ebsz7ftaruaf
    name: Ferroli Titano Twin DT EWH
primary_entity:
  entity: water_heater
  dps:
    - id: 1
      name: operation_mode
      type: boolean
      mapping:
        - dps_val: false
          value: "off"
        - dps_val: true
          constraint: work_mode
          conditions:
            - dps_val: manual
              value: electric
            - dps_val: eco
              value: eco
              icon: "mdi:leaf"
    - id: 2
      type: string
      name: work_mode
      hidden: true
    - id: 9
      type: integer
      name: temperature
      range:
        min: 40
        max: 80
      mapping:
        - step: 5
      unit: C
    - id: 10
      type: integer
      name: current_temperature
    - id: 101
      type: bitfield
      name: fault_code
      mapping:
        - dps_val: 1
          value: E2 Operating without water
        - dps_val: 2
          value: E3 NTC temperature sensor
        - dps_val: 4
          value: E4 Water overheating
        - dps_val: 16
          value: E6 clock RTC failure
secondary_entities:
  - entity: switch
    name: Anti-legionella
    category: config
    dps:
      - id: 4
        type: boolean
        name: switch
        mapping:
          - dps_val: true
            icon: "mdi:shield-cross-outline"
          - dps_val: false
            icon: "mdi:shield-remove-outline"
  - entity: binary_sensor
    class: problem
    category: diagnostic
    dps:
      - id: 101
        type: bitfield
        name: sensor
        mapping:
          - dps_val: 0
            value: false
          - value: true
  - entity: binary_sensor
    name: Heating status
    class: running
    category: diagnostic
    dps:
      - id: 102
        type: string
        name: sensor
        mapping:
          - dps_val: Heating
            value: true
          - value: false
  - entity: binary_sensor
    translation_key: defrost
    category: diagnostic
    dps:
      - id: 103
        type: boolean
        name: sensor
  - entity: sensor
    name: Target temperature
    class: temperature
    category: diagnostic
    dps:
      - id: 104
        type: integer
        name: sensor
        unit: C
