-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Add power sensor to WiZ #73260
Add power sensor to WiZ #73260
Conversation
Hey there @sbidy, mind taking a look at this pull request as it has been labeled with an integration ( |
Power monitoring being false |
"""Update the WiZ device.""" | ||
try: | ||
await bulb.updateState() | ||
if bulb.power_monitoring is not False: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is not False
? can we just do
if bulb.power_monitoring is not False: | |
if bulb.power_monitoring: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be None
which means it is not initialized yet so we have to poll to get it initialized. False
means its tried to do it and failed so the device doesn't support it and we shouldn't try again.
Thanks 👍 |
Kinda on the fence on this one though since its only limited to a few of the newer power sockets, but it was a feature request |
Proposed change
Only following modules supports power sensors:
ESP25_SOCKET_01
ESP20_SHDW_31R
ESP20_SHRGB_31R
ESP20_SHTW_31R
They don't seem to be available in the US market yet, but I was able to get an EU one and use a voltage adapter for testng.
Changelog: sbidy/pywizlight@v0.5.13...v0.5.14
Type of change
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: