GadgetReactor / pyHS100

Python Library to control TPLink Switch (HS100 / HS110)
Other
409 stars 128 forks source link

Fix CLI for HS300 #177

Closed dberlin closed 5 years ago

dberlin commented 5 years ago

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.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 80.278% when pulling ef8351644d624d29a9548704e7d574b20f22a91d on dberlin:master into 2d60467beab8c95ec3006a559a4a98bae830ba89 on GadgetReactor:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 80.278% when pulling ef8351644d624d29a9548704e7d574b20f22a91d on dberlin:master into 2d60467beab8c95ec3006a559a4a98bae830ba89 on GadgetReactor:master.

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 80.278% when pulling ef8351644d624d29a9548704e7d574b20f22a91d on dberlin:master into 2d60467beab8c95ec3006a559a4a98bae830ba89 on GadgetReactor:master.