I have a wink hub as my z-wave interface. It sometimes takes two or three tries before the desired action occurs. Maybe my wink z-wave radio is weak, but I have been scheduling actions more than once and using multiple robots to address the problem. As I have begun moving to Home Assistant automations, I’ve been writing them to run multiple times assuming I would have the same issue. But if Home Assistant checks for success before ending an automation this is unnecessary. So my question is: does an automation assume it’s actions will be successful and quit or does it verify success?
If Wink isn’t verifying that the action has been completed, then HA won’t know that the action failed. If you were to switch to a Z-Wave stick, then HA will know if the action works (or not), and will retry if needed.
Terrific, Thanks. I have a Z-wave stick on order, it’s due tomorrow.
Do you mean that HA checks the state after an action in a automation and if the state is not reached, it will perform the action again?
Correct me if I’m wrong, but I don’t believe that’s true. Services don’t have return-values, or at least didn’t have them last time I have looked at them. And without a return value HASS can’t know if an action was successful or not. And I know for sure that Python-exceptions won’t cause a retry as well. I use Telegram for notifications, and at least once a day there’s a notification that doesn’t get sent out because of a connection error. Because of that I actually use two notification services to get some redundancy forrimportant stuff.
So from my knowledge: HASS actions are “fire and forget”. I do hope though this has changed or will change at some point in time.
As @danielperna84 said, actions are fire and forget. It does not check for success.
Maybe you can use the python_script to have a script that calls the service, waits and checks if it succeeded, and then tries again.
I’m not sure that you can use the same python_script for multiple entities (receiving entity_id as data attribute) since I don’t know if more than one instance of the same python_script can be running at once (you can’t have more than one instance of the normal scripts).
I was quite surprised when I heard that HA checks and retries on failure. Not so surprised it doesn’t.
OTOH, in python I use a
‘’’
try:
except:
‘’’
sequence to know if my request was successful. That was my partial workaround in python for the problems I had with wink before I installed HA. Mostly though I just sent my requests multiple times. I suppose I might still go back to that even though I’m pretty happy with my
HA install.
I think if I’m going to use python with HA i’ll probably use the Python API rather than making it part of an automation. I may do that if I like the Z-stick better than wink for z-wave devices. The only other advantage over my old implementation using pywink and phue would be the possibility of Local Control with wink.
BTW I tried Homeseer software before moving to HA. It does check for success before moving on as far as I could tell. Nevertheless I hated the user interface and the documentation, especially the linux documentation was not good either.
Actions may be, but either HA or OZW certainly knows when a Z-Wave device hasn’t actioned the request. You can see this by watching the OZW log.