Skip to content

Do not get battery status for mains powered devices - #1131

Merged
syssi merged 6 commits into
rytilahti:masterfrom
starkillerOG:mains_powered
Sep 5, 2021
Merged

Do not get battery status for mains powered devices#1131
syssi merged 6 commits into
rytilahti:masterfrom
starkillerOG:mains_powered

Conversation

@starkillerOG

Copy link
Copy Markdown
Contributor

This schould fix the errors as reported here: #1121 (comment)
If the battery status is requested from a mains powered device like the lumi.plug.mmeu01 it gives an error like:
miio.exceptions.DeviceError: {'code': -4003, 'message': 'prop or action not exist'}

@starkillerOG

Copy link
Copy Markdown
Contributor Author

@rytilahti could you look at this and merge?

Comment thread miio/gateway/devices/subdevice.py
Comment thread miio/gateway/devices/subdevice.py Outdated
Comment thread miio/gateway/devices/subdevice.py Outdated
Comment thread miio/gateway/devices/subdevice.py Outdated
@starkillerOG

Copy link
Copy Markdown
Contributor Author

@syssi any more suggestions?

@codecov-commenter

codecov-commenter commented Sep 4, 2021

Copy link
Copy Markdown

Codecov Report

Merging #1131 (d16dd98) into master (981368c) will decrease coverage by 0.05%.
The diff coverage is 22.22%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1131      +/-   ##
==========================================
- Coverage   74.87%   74.81%   -0.06%     
==========================================
  Files          76       76              
  Lines        8999     9006       +7     
  Branches      767      769       +2     
==========================================
  Hits         6738     6738              
- Misses       2077     2084       +7     
  Partials      184      184              
Impacted Files Coverage Δ
miio/gateway/devices/subdevice.py 36.87% <22.22%> (-1.93%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 981368c...d16dd98. Read the comment docs.

@syssi

syssi commented Sep 4, 2021

Copy link
Copy Markdown
Collaborator

I will merge this PR later the day. I want to give @rytilahti the chance to react.

Comment thread miio/gateway/devices/subdevice.py
@starkillerOG

Copy link
Copy Markdown
Contributor Author

I think this can now be merged

@syssi
syssi merged commit 9ad62be into rytilahti:master Sep 5, 2021
@rytilahti rytilahti added the bug label Nov 30, 2021
@rytilahti rytilahti mentioned this pull request Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants