Passing events between appdaemon apps

I’m trying to use a sensor created by appdaemon:

self.set_state("sensor."+ location + "_temp_low", state = 'on', attributes = {"device_class": "cold" })

To trigger a callback in a seperate appdaemon app:

low_temp_warning = self.args['low temp warning']
self.listen_state(self.cutoff, low_temp_warning, new = 'on')		

The set_state works fine, the sensor is showing in the front end, I’ve also set the loading priority so that the set_state is registered before the listen_state. However the callback does not trigger, I’m thinking this may be by design, something to do with threading?

Does self.get_state(low_temp_warning) give you a result?

1 Like

Thanks for the reply Burningstone, realised the issue, my appdaemon error log tail was not updating properly, the issue was with the cutoff function not the callback.

For anyone else reading this, the code in my OP works fine. It is totally possible to have apps trigger each other with set_state / listen_state

1 Like