Skip to content

Conversation

@sdb9696
Copy link
Collaborator

@sdb9696 sdb9696 commented Apr 25, 2024

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

Copy link
Member

@rytilahti rytilahti left a comment

Choose a reason for hiding this comment

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

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 rytilahti merged commit 8e0c093 into python-kasa:feat/iot_emeter Apr 25, 2024
@sdb9696 sdb9696 deleted the fix_iot_emeter_pr branch May 3, 2024 09:53
@sdb9696 sdb9696 added the enhancement New feature or request label Jun 22, 2024
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