On off? or off on?

jltnol
Posts: 1162
Joined: Tue Oct 15, 2013 11:11 pm

On off? or off on?

Post by jltnol »

So I have an action group setup to turn some stuff OFF in Indigo. I've got it working in the HomeKit Bridge just perfectly, but of course, I have to say "Turn On XXX" to activate the Action Group that turns stuff off. The Action Group is set up as a 'switch' in HomeKit, and I'd like to invert the On/Off state., so I can say "Turn off XXX", which will activate the Action Group and obviously turn stuff off.

But from what I can tell, this inversion can't be done when adding the Action Group to HomeKit Bridge, and once the Action Group is added, I've not found a way to Invert this. While trying to edit this, the Invert Checkbox is visible, but checking it and clicking SAVE doesn't work. And once you click the "Do Selected Action".... to edit the selected item... the Invert checkbox dissapears.

Is this possible? Am I missing something? Otherwise, HomeKit Bridge is the BOMB!
colin_d
Posts: 34
Joined: Sat Nov 08, 2014 11:46 am
Location: East Sussex

Re: On off? or off on?

Post by colin_d »

I use an action group to control some living room lights, it contains a script that checks for the lights on or off then acts accordingly.
I can fire the action group just with 'Hey Siri, Lights' - no on or off required.
That just toggles the lights, or if they're set way low for example, they brighten up to normal level.
No doubt there's an easier way to do it but this works for me :D

Code: Select all

wall = indigo.devices[262171949]      
tab1 = indigo.devices[557163163]		
tab2 = indigo.devices[982908862]		
if (wall.brightness==34) or (tab1.brightness==34) or (tab2.brightness==34):
	indigo.actionGroup.execute(879372069)   # turn off 3 lights
else:
	indigo.actionGroup.execute(11676588)    # normal level 3 lights
jltnol
Posts: 1162
Joined: Tue Oct 15, 2013 11:11 pm

Re: On off? or off on?

Post by jltnol »

I might try to give this a shot.... but its more than just lights. . Airplay devices need to be disconnected, and then quit some apps after... but, I can see how I can probably get this to work checking a variable which would indicate whether the music system is off or no.

Thanks.. :)
Post Reply

Return to “HomeKit Bridge”