Trigger with Python

Posted on
Tue Mar 07, 2023 5:27 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Trigger with Python

I have a trigger which gets "triggered" when a bulb is switched on, how can.I do the same in Python?

Thanks
Marco

Posted on
Tue Mar 07, 2023 7:49 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Trigger with Python

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

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Tue Mar 07, 2023 8:16 am
MarcoGT offline
Posts: 1091
Joined: Sep 11, 2014
Location: Germany

Re: Trigger with Python

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.

Posted on
Tue Mar 07, 2023 8:32 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Trigger with Python

Why do you want to have triggers in Python? There may be a better solution.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 8 guests