Dear HA community,
I’m guessing I’m not the first one with this question but have trouble in looking for right solution from forums. Here is my problem: this summer I had a ZigBee plug that controlled pump for watering my plants. It happened several times that it didn’t execute the command and every time it was a problem for my plants. I have also noticed that I would like to have some kind of double check mechanism for our terrarium light. I’m not looking to improve ZigBee reliability (this is separate story) but just want to get notified when something is not working so I can manually fix it. I need something generic which I can apply to different devices. Here is logic that I would like to implement:
- Define a variable “status” which will be used for compare the wanted state and actual state
- if “status” is on and ZigBee plug is off then send a command to ZigBee plug to turn on the switch
- If “status” is off and ZigBee plug is on then send a command to ZigBee plug to turn off the switch
- A few seconds after previous commands execution:
4.1 If “status” is on but a) ZigBee plug reports power consumption different than e.g. 4W (detects that my pump is broken or disconnected etc) b) ZigBee plug doesn’t report anything (detecting that my ZigBee plug is gone bad) then raise notification (I already have setup Telegram group where I get messages for outstanding situations from my HA)
4.2 If “status” is off but ZigBee plug reports power consumption other than 0W then raise notification
I’m a bit confused on which one HA mechanism is most suitable for me (automation, blueprints, templates, scripts, …). It should be parametrized with selection of: on/off device, expected power range (min,max), a notification device and a text for notification.
Can you recommend me where to start from?
Thank you in advance!
Aleksandar