Help me understand this. Appdaemon listens for events on the buss and reacts to those events. It doesn’t actually consume the event, because more than one automation can pickup the event. So lets say I have an app that listens for light events. If a light event comes in, it compares the entity to a list of lights that it is concerned about. The remain events are allowed to move along their way happily either being picked up by other listeners or not, but eventually reaching the light which it delivers it’s message to. Lets say that I change the brightness on the light as part of my app. Does the light actually get two commands now, the original one to turn the light on, and another to change the brightness? Is there a way to catch the original event and keep it from turning on the light? How does that architecture look?
i dont know about architecture, but i think i know this:
an event that comes onto the HA bus has happened.
a temperature that is changed or a light that is turned on.
so i think that its an event as soon as the action is done.
appdaemon listens to that event. it thinks: “he, i see a temperature HAS changed so i have to do something”
there is obviously no option to undo the change, before or after appdaemon sees that the temperature has changed.
i dont think that light changes are different from temperature changes.
if i put on the lights with a remote, or with an app on a mobile or with a switch or with the HA gui shouldnt make any difference in handling the event.
so the event has happened and cant be undone, you only can do another event to cancel it.
Rene is correct - AppDaemon is one of many potential consumers of an event. The HA Frontend uses the exact same mechanism for example to update on device states. Once an event is signalled to the eventstream it has already happened. The light is on. by the time we are informed, it is a done deal. You can then react and change the brightness but there is no way to intercept the event as it is already in the past.
but if you aren’t home to see it do you really know if the light came on???
Thanks
Easy! Install an expensive camera just to make sure it is working
use more expensive light switches. they will only give the setting on if they are really on.
with 433 mhz you can only make sure by lightsensors.
Rene,
You’ve heard the joke before about if a tree falls in the forrest and no one is there to hear it does it make a sound??
If your automation turns on your lights and no one is there to see it do the lights really come on.
Get it?
get it. but then you told it wrong
if your lights go on at home and there’s noone there, do they shine?