-
First off, let me say pyscript has changed my life for the better - I can finally organize automations mostly the way I want and do complex logic without building out huge yaml templates. Thank you to everybody who made this possible. The problem I'm having is I want to listen for a timer.finished service call from a specific entity, but the event trigger examples with a filter don't work and I can't figure out how to I should do it. The code given in the docs is:
and it throws this error:
I tried making sure it was "light" and not "lights", but that didn't change anything. Right now, it seems the only way I can filter call service events is to get the service_data and look for my timer entity. Is there a better way? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
Because of the
|
Beta Was this translation helpful? Give feedback.
-
I've got this to work:
...But putting the service and service_data in the function arguments causes the above exception. |
Beta Was this translation helpful? Give feedback.
-
Thanks to ryaowe's help, the working result is:
|
Beta Was this translation helpful? Give feedback.
Thanks to ryaowe's help, the working result is: