brandond / esphome-tuya_pir

ESPHome support for cheap WiFi PIR sensors
66 stars 21 forks source link

Can it do leak sensors too? #28

Open workingmanrob opened 2 years ago

workingmanrob commented 2 years ago

I got both a door and leak sensor recently and using this code I was able to get the door sensor working like a champ and am now wondering if it could handle the leak sensor as well.

The device I have is like the one shown here - https://github.com/xcompass/Tuya-Water-Leak-Sensor - and looks remarkably similar to the Neo PIR sensor.

It is of course just a binary sensor - if wet, on - else off.

So I was able to put esphome on there and just created a wet / dry template sensor in home assistant that checks if the device is online - if so, wet - else dry. I'm sure it could be smarter than that though.

Thanks!