Thanks @dkarv , but I couldn’t wait and had a little Christmas holiday so made RESTful sensors. Any error message will be shown as a triangle below the circle diagram, when there is something wrong. I implemented a pop-up to show the full error messages when the alert triangle is clicked.
#################################################################
# #
# BWT Perla REST API Call #
# #
#################################################################
rest:
- authentication: basic
username: !secret bwt_login_code
password: !secret bwt_login_code
scan_interval: 60
resource: !secret bwt_GetCurrentData_url
sensor:
- name: "BWT Perla"
icon: "mdi:water"
value_template: >
{% set codes =
{ "": "OK",
"1": "Error - Motor / valve 1 cannot be controlled",
"2": "Error - Motor / valve 2 cannot be controlled",
"3": "Error - Blending motor cannot be controlled",
"5": "Warning - Regenerative level is <= 20%",
"8": "Error - Power consumption of motor / valve 1 is too high",
"9": "Error - Power consumption of motor / valve 2 is too high",
"10": "Error - Power consumption of motor / valve 3 is too high",
"12": "Error - Power consumption at one of the sole- noid valves is too high",
"13": "Error - AQA Stop sensor set volume exceeded",
"14": "Error - AQA Stop sensor wired floor sensor has triggered",
"15": "Warning - AQA Watch leakage water was detected",
"16": "Warning - Line pressure has dropped",
"21": "Error - Piston 1 / 2 is in an undefined position",
"22": "Error - Error on internal electronics",
"25": "Warning - Too little brine was sucked off during regeneration",
"26": "Error - AQA Guard Wireless Sensor wireless floor sensor has triggered",
"27": "Error - Regenerative level = 0%",
"32": "Warning - Routine maintenance must be carried out by the customer",
"33": "Warning - The inspection must be carried out by the customer",
"34": "Warning - Expert maintenance must be carried out by customer service",
"35": "Warning - The mineral substance container of the metering unit is nearly empty",
"36": "Warning - The mineral substance container of the metering unit is empty",
"43": "Error - Power consumption at one of the solenoid valves is too high",
"44": "Error - Power consumption at one of the solenoid valves is too high",
"45": "Error - Power consumption of the metering pump is too high.",
"46": "Error - Power consumption of the motorised ball valve is too high",
"54": "Warning - No pulses were counted on the water meter for 30 days",
"55": "Warning - Repeatedly, no brine was sucked off during regeneration",
"56": "Error - PCB 1.0 failed to initialise",
"57": "Error - PCB 1.1 failed to initialise",
"58": "Error - Motor 1 position faulty",
"59": "Error - Motor 2 position faulty",
"61": "Warning - The measured conductivity is too high",
"62": "Warning - The measured conductivity is above limit 1",
"63": "Warning - The measured conductivity is above limit 2",
"64": "Warning - The measured conductivity is above the water limit",
"65": "Error - The system has no brine available, which means that it is not functional",
"66": "Warning - The connection between the system and the temperature sensor has been interrupted",
"67": "Warning - The measured temperature is too high",
"68": "Error - The motorised ball valve does not respond",
"74": "Warning - Reminder to change/flush the external filter",
"75": "Warning - An unsaturated brine results in lower capacity",
"88": "Warning - There is a fault in the metering pump"
} %}
{{ codes.get(value_json['ActiveErrorIDs'], 'unknown') }}
json_attributes:
- ActiveErrorIDs
- BlendedWaterSinceSetup_l
- CapacityColumn1_ml_dH
- CapacityColumn2_ml_dH
- CurrentFlowrate_l_h
- DosingSinceSetup_ml
- FirmwareVersion
- HardnessIN_dH
- HardnessOUT_dH
- HolidayModeStartTime
- LastRegenerationColumn1
- LastRegenerationColumn2
- LastServiceCustomer
- LastServiceTechnican
- OutOfService
- RegenerationCountSinceSetup
- RegenerationCounterColumn1
- RegenerationCounterColumn2
- RegenerativLevel
- RegenerativRemainingDays
- RegenerativSinceSetup_g
- ShowError
- WaterSinceSetup_l
- WaterTreatedCurrentDay_l
- WaterTreatedCurrentMonth_l
- WaterTreatedCurrentYear_l
- name: "BWT Perla State"
value_template: "{{ value_json.ActiveErrorIDs}}"
json_attributes:
- ActiveErrorIDs
- name: "BWT Perla Current Flowrate"
unit_of_measurement: L
icon: "mdi:water"
value_template: "{{ value_json.CurrentFlowrate_l_h}}"
json_attributes:
- CurrentFlowrate_l_h
- name: "BWT Perla Daily Consumption"
unit_of_measurement: L
device_class: water
state_class: total_increasing
icon: "mdi:faucet"
value_template: "{{ value_json.WaterTreatedCurrentDay_l}}"
json_attributes:
- WaterTreatedCurrentDay_l
- name: "BWT Perla Total Consumption"
unit_of_measurement: L
device_class: water
state_class: total_increasing
icon: "mdi:water"
value_template: "{{ value_json.WaterSinceSetup_l}}"
json_attributes:
- WaterSinceSetup_l
- name: "BWT Perla Salt Level"
icon: "mdi:shaker-outline"
value_template: "{{ value_json.RegenerativLevel}}"
json_attributes:
- RegenerativLevel
- name: "BWT Perla Salt Level Days"
icon: "mdi:calendar-clock"
value_template: "{{ value_json.RegenerativRemainingDays}}"
json_attributes:
- RegenerativRemainingDays