Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when displaying Power load using Plug CLI #144

Closed
zacharynguyeenx opened this issue Dec 14, 2017 · 3 comments
Closed

Exception when displaying Power load using Plug CLI #144

zacharynguyeenx opened this issue Dec 14, 2017 · 3 comments

Comments

@zacharynguyeenx
Copy link

Problem: Running the Plug CLI will cause an exception on plug_cli.py:81 when displaying Power load due to PlugStatus.load_power() not available.

Suggestion: get rid of this line or implement PlugStatus.load_power()

@zacharynguyeenx zacharynguyeenx changed the title Exception when displaying Power load in Plug CLI Exception when displaying Power load using Plug CLI Dec 14, 2017
@rytilahti
Copy link
Owner

Currently only powerstrip offers load_power, I think the cli tool should be modified to detect what type of plug device it's accessing and behave accordingly. Similar to what is done in https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/switch/xiaomi_miio.py .

@zacharynguyeenx
Copy link
Author

Ain't the Plug CLI only be used for plugs? plug_cli.py:56 initializes a Plug and there's no initialization of PowerStrip found in there.

If it's only for plugs then we don't really have to care about detecting its type for now.

@rytilahti
Copy link
Owner

It would be nice to be able to control also e.g. that powerstrip with the same tool for two reasons: 1) I have not find time to create a generic tool allowing control of all supported devices, and won't be able to do so in the near future, and 2) the interface for plugs and that of the strip share many things in common, so supporting both would not be a big hurdle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants