The array of on states is returned by get_is_on, not is_on
Before this change, running discover will give:
File "cli.py", line 167, in state
is_on = dev.is_on()
TypeError: 'bool' object is not callable
This is because is_on is a property.
If you use is_on here, it crashes a few lines later anyway because it indexes into it expecting it to be an array.
Which is what get_is_on returns.
Coverage remained the same at 80.278% when pulling ef8351644d624d29a9548704e7d574b20f22a91d on dberlin:master into 2d60467beab8c95ec3006a559a4a98bae830ba89 on GadgetReactor:master.
Coverage remained the same at 80.278% when pulling ef8351644d624d29a9548704e7d574b20f22a91d on dberlin:master into 2d60467beab8c95ec3006a559a4a98bae830ba89 on GadgetReactor:master.
Coverage remained the same at 80.278% when pulling ef8351644d624d29a9548704e7d574b20f22a91d on dberlin:master into 2d60467beab8c95ec3006a559a4a98bae830ba89 on GadgetReactor:master.
The array of on states is returned by get_is_on, not is_on Before this change, running discover will give: File "cli.py", line 167, in state is_on = dev.is_on() TypeError: 'bool' object is not callable
This is because is_on is a property. If you use is_on here, it crashes a few lines later anyway because it indexes into it expecting it to be an array. Which is what get_is_on returns.
With this change, everything works in discover.