menahishayan / HomeScript

Python script for command line control of HomeBridge (HomeKit)
GNU General Public License v3.0
94 stars 16 forks source link

.selectGroup() seems to be required. Is it? #13

Open AlexMaghen opened 2 years ago

AlexMaghen commented 2 years ago

First, thank you for this excellent thing! :)

If I run...

hs.selectAccessory('Floor_Light')
hs.printSelectedItems()
hs.setStates("0")

No Accessories are returned and the setStates() does not work (logs attached), even though the accessory name provided comes straight out of "printAccessories()".

If I add in selectGroup('lights') as follows, two lights are returned and the action is properly executed on both...

hs.selectAccessory('Floor_Light')
hs.selectGroup('lights')
hs.printSelectedItems()
hs.setStates("0")

I've also included the super simple test python file ("Homebridge_ctl.txt").

Can't quite figure what I'm doing wrong here. THANKS for any help!

Alex

homescript_debug_2022.01.20.log homescript_exception_2022.01.20.log Homebridge_ctl.txt

TondaRuzicka commented 2 years ago

I have the same issue. I list the accessories, I select one, I print selected and it's empty.