FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Do not automatically add emeter to iot strip by sdb9696 · Pull Request #865 · python-kasa/python-kasa · GitHub

Repository navigation

Do not automatically add emeter to iot strip - #865

Merged
rytilahti merged 3 commits into
python-kasa:feat/iot_emeterfrom
sdb9696:fix_iot_emeter_pr
Apr 25, 2024
Merged

rytilahti merged 3 commits into
python-kasa:feat/iot_emeterfrom
sdb9696:fix_iot_emeter_pr

Conversation

sdb9696 commented Apr 25, 2024 •
edited
Loading

Copy link
Copy Markdown
Contributor

This fixes the current broken tests in #844 caused by the fixtures for HS107(US)_1.0_1.0.8.json and KP400(US)_1.0_1.0.10.json having the emeter value in the fixture but no get_realtime value. Other strips do not fail because they do not have the emeter value in the fixture and the FakeIotProtocol creates one for them.

It seems that #299 introduced the adding of Emeter in the smart strip constructor (in commit c8ad99a) and this was added after #243 which adds the Emeter in the IoDevice update() method so perhaps there is an implication to this change that I'm missing, although it seems _create_emeter_request is no longer called anywhere so maybe that was a historical reason.

N.B. The tests all pass with this PR.

Link to CI run on branch

rytilahti left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Let's give it a go and fix it later if need to be, it's more important to get the feature-based emeter sensors in the HA PR than whatever special handling we are going to need potentially for HS300.

rytilahti merged commit 8e0c093 into python-kasa:feat/iot_emeter Apr 25, 2024
sdb9696 deleted the fix_iot_emeter_pr branch May 3, 2024 09:53
sdb9696 added the enhancement New feature or request label Jun 22, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL