Hello all,
I have 2 water meters.
Last night both meters were unavailable for 1 minute.
Cause unknown (network ?)
This has caused the utility meters to show incorrect values.
How can I prevent the utility meters from giving wrong values if the sensor(s) fail?
Watersensor 1 minute unavailable.
Response daily utility meter.
Watersensor 1 minute unavailable.
sensor:
- platform: rest
name: meter_a
json_attributes:
- waterflow
- waterquantity
resource: http://192.168.0.101/water.html
- platform: rest
name: meter_b
json_attributes:
- waterflow
- waterquantity
resource: http://192.168.0.100/water.html
template:
- sensor:
name: "meter_a quantity"
state: "{{ ( state_attr('sensor.meter_a','waterquantity')|int) }}"
state_class: "measurement"
unit_of_measurement: "l"
- sensor:
name: "meter_b quantity"
state: "{{ ( state_attr('sensor.meter_b', 'waterquantity')|int ) }}"
state_class: "measurement"
unit_of_measurement: "l"
utility_meter:
daily_meter_a:
source: sensor.meter_a_quantity
cycle: daily
name: daily meter_a
daily_meter_b:
source: sensor.meter_b_quantity
cycle: daily
name: daily meter_b
I understand that I can/should solve this with availability template.
Now to understand how this works…