Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add TP25 fixtures #729

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

Merged
merged 3 commits into from
Feb 1, 2024
Merged

Add TP25 fixtures #729

merged 3 commits into from
Feb 1, 2024

Conversation

bdraco
Copy link
Member

@bdraco bdraco commented Jan 31, 2024

Note that this doesn't work in Hass yet

Error setting up entry None TP25 for tplink
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 434, in async_setup
    result = await component.async_setup_entry(hass, self)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/components/tplink/__init__.py", line 194, in async_setup_entry
    child_coordinators = [
                         ^
  File "/usr/src/homeassistant/homeassistant/components/tplink/__init__.py", line 197, in <listcomp>
    TPLinkDataUpdateCoordinator(hass, child, timedelta(seconds=60))
  File "/usr/src/homeassistant/homeassistant/components/tplink/coordinator.py", line 42, in __init__
    self.has_emeter = device.has_emeter
                      ^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/kasa/tapo/tapodevice.py", line 222, in has_emeter
    return "energy_monitoring" in self._components
                                  ^^^^^^^^^^^^^^^^
AttributeError: 'ChildDevice' object has no attribute '_components'

Copy link

codecov bot commented Jan 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1acf4e8) 87.99% compared to head (18cbcc2) 87.99%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #729   +/-   ##
=======================================
  Coverage   87.99%   87.99%           
=======================================
  Files          41       41           
  Lines        3632     3632           
  Branches      910      910           
=======================================
  Hits         3196     3196           
  Misses        362      362           
  Partials       74       74           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@bdraco bdraco marked this pull request as ready for review January 31, 2024 16:55
@rytilahti
Copy link
Member

Looks like the tests pass, so we lack tests for this, too. Odd that it didn't crash with p300, needs a test and implementing setting _components based on get_child_device_component_list.

@rytilahti
Copy link
Member

Please update the fixture after #733 gets merged.

@rytilahti rytilahti merged commit 1f62aee into master Feb 1, 2024
@rytilahti rytilahti deleted the tp25 branch February 1, 2024 18:52
rytilahti added a commit to rytilahti/python-kasa that referenced this pull request Feb 2, 2024
[Full Changelog](python-kasa/python-kasa@0.6.2...0.6.2.1)

**Fixed bugs:**

- Avoid crashing on childdevice property accesses [\python-kasa#732](python-kasa#732) (@rytilahti)

**Merged pull requests:**

- Retain last two chars for children device\_id [\python-kasa#733](python-kasa#733) (@rytilahti)
- Add TP15 fixture [\python-kasa#730](python-kasa#730) (@bdraco)
- Add TP25 fixtures [\python-kasa#729](python-kasa#729) (@bdraco)
- Various test code cleanups [\python-kasa#725](python-kasa#725) (@rytilahti)
- Unignore F401 for tests [\python-kasa#724](python-kasa#724) (@rytilahti)
@rytilahti rytilahti mentioned this pull request Feb 2, 2024
rytilahti added a commit that referenced this pull request Feb 2, 2024
[Full Changelog](0.6.2...0.6.2.1)

**Fixed bugs:**

- Avoid crashing on childdevice property accesses [\#732](#732) (@rytilahti)

**Merged pull requests:**

- Retain last two chars for children device\_id [\#733](#733) (@rytilahti)
- Add TP15 fixture [\#730](#730) (@bdraco)
- Add TP25 fixtures [\#729](#729) (@bdraco)
- Various test code cleanups [\#725](#725) (@rytilahti)
- Unignore F401 for tests [\#724](#724) (@rytilahti)
@sdb9696 sdb9696 added maintenance Project improvements and maintenance new device New device supported due to fixture being added and removed maintenance Project improvements and maintenance labels Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new device New device supported due to fixture being added
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants