Hello Everyone,
I am pretty new to HA and this is the first shout for help, so hope its in the right place and I am very much learning, lots of trial by error, more errors than anything else. Anyway I have decided to try and make a rain sensor using a Claber rain sensor which has a magnetic reed switch in it (makes contact when dry / breaks contact when wet) and an Aqara Zigbee water leak sensor.
I have got the Rain sensor and Aqara leak sensor connected within HA and it is changing state when filled and emptied of water but the Dry and Wet are the wrong way round –
Here it is shown as ‘Dry’ (Rain Sensor) although the rain sensor is full of water.
I have tried lots of different suggestions from the forum but no such luck
So in the interim I have ended up creating two binary sensors ‘Garden Dry’ / ‘Garden Wet’ as per the image above
The code I have used for this is
- platform: template
sensors:
garden_rain_sensor_wet:
entity_id: binary_sensor.water_sensor
value_template: >
{{ is_state("binary_sensor.water_sensor", "off") }}
device_class: moisture
friendly_name: Garden Wet
- platform: template
sensors:
garden_rain_sensor_dry:
entity_id: binary_sensor.water_sensor
value_template: >
{{ is_state("binary_sensor.water_sensor", "on") }}
device_class: moisture
friendly_name: Garden Dry
Does anyone have any suggestions to have one binary sensor that shows dry and wet the corrected way round and if it is in color (wet = red / dry = green) that would be fantastic…
Thank you for any help you can provide….