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
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…
resolves to ‘true’ in an if statement (checked in dev tools) when the value is ‘on’, you don’t need to explicitly check for it. See Template - Home Assistant
The sensor is on if the template evaluates as True, yes, on, enable or a positive number. Any other value will render it as off. The actual appearance in the frontend (Open/Closed, Detected/Clear etc) depends on the sensor’s device_class value
After some time away, I am back and trying to get this to work but, in an attempt to try and simplify what I am doing.
Can anyone give some guidance to how to get ha to display the opposing state to what a rain sensor is saying. I.E if it is reading as wet change it to say it is dry and vice verse.
Hi Pedolsky, i haven’t had the chance to try and move this little project on, but I find I have some more time now and would appreciate your help.
To cut things back to a simpler arrangement I have an aqura leak sensor which I would like to invert its output within home assistant.
It current shows as ‘wet’ when I want it to ‘Show’ dry and vice versa.
Any suggestions?
Thanks