Page 1 of 1

Trigger with Python

PostPosted: Tue Mar 07, 2023 5:27 am
by MarcoGT
I have a trigger which gets "triggered" when a bulb is switched on, how can.I do the same in Python?

Thanks
Marco

Re: Trigger with Python

PostPosted: Tue Mar 07, 2023 7:49 am
by DaveL17
You'll need to "subscribe to changes" to listen for all relevant traffic and filter for the object you want to take action on.

https://wiki.indigodomo.com/doku.php?id=indigo_2022.2_documentation:object_model_reference#subscribing_to_object_change_events

Re: Trigger with Python

PostPosted: Tue Mar 07, 2023 8:16 am
by MarcoGT
Thanks a lot, I though it was more immediate; maybe with a variable and checking the value it would be faster, need to think about it.

Re: Trigger with Python

PostPosted: Tue Mar 07, 2023 8:32 am
by DaveL17
Why do you want to have triggers in Python? There may be a better solution.