Skip to content
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

[BUG]: KeyError: 'modulation_level' with Anna #340

Closed
ElianKars opened this issue Jan 30, 2023 · 5 comments · Fixed by home-assistant/core#87001
Closed

[BUG]: KeyError: 'modulation_level' with Anna #340

ElianKars opened this issue Jan 30, 2023 · 5 comments · Fixed by home-assistant/core#87001
Labels
bug Something isn't working

Comments

@ElianKars
Copy link

Describe the bug.

I get a Unexpected error fetching plugwise data: 'modulation_level' with plugwise-beta (v0.34.3).

My boiler (Intergas Kombi Kompakt HR 36/30) doesn't support the OpenTherm 'relative modulation level' message. Therefore, the modulation level is not available in the graph, in the Smile-T html-interface. Also no <type>modulation_level</type> tag in the XML dump can be found.

graph

This situation looks a bit like this problem in Core: home-assistant/core#79708

What version of Home Assistant Core has the issue?

2023.1.7

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

How did you install plugwise-beta?

HACS

What kind of Plugwise device is having issues?

Smile: Anna

What firmware version is your Plugwise product at?

4.3.13

Logging

2023-01-30 14:26:26.990 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-01-30 14:26:26.990 WARNING (SyncWorker_3) [homeassistant.loader] We found a custom integration plugwise which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-01-30 14:26:32.446 DEBUG (MainThread) [custom_components.plugwise] DUC cooldown interval: 1.5
2023-01-30 14:26:33.255 ERROR (MainThread) [custom_components.plugwise] Unexpected error fetching plugwise data: 'modulation_level'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 225, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/plugwise/coordinator.py", line 97, in _async_update_data
    await self._connect()
  File "/config/custom_components/plugwise/coordinator.py", line 79, in _connect
    self.api.get_all_devices()
  File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 149, in get_all_devices
    self._all_device_data()
  File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 98, in _all_device_data
    data = self._get_device_data(device_id)
  File "/usr/local/lib/python3.10/site-packages/plugwise/smile.py", line 274, in _get_device_data
    device_data = self._get_appliance_data(dev_id)
  File "/usr/local/lib/python3.10/site-packages/plugwise/helper.py", line 1064, in _get_appliance_data
    self._cooling_active = data["modulation_level"] == 100
KeyError: 'modulation_level'
2023-01-30 14:26:33.256 DEBUG (MainThread) [custom_components.plugwise] Finished fetching plugwise data in 0.809 seconds (success: False)
2023-01-30 14:26:33.256 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Smile Anna' for plugwise integration not ready yet: 'modulation_level'; Retrying in background
2023-01-30 14:26:33.280 DEBUG (MainThread) [custom_components.plugwise] DUC cooldown interval: 1.5
[...]

### Diagnostics information

Not available in this state.

### Additional information

I successfully used the Plugwise integration from Home-Assistant Core with Anna. However, I would also very much like to use my old USB stick with Circles. I then removed the Plugwise Core integration and switched to plugwise beta v0.34.3.
@ElianKars ElianKars added the bug Something isn't working label Jan 30, 2023
@bouwew
Copy link
Contributor

bouwew commented Jan 30, 2023

Thanks for reporting the bug. I'll have a look at it later tonight.

@bouwew
Copy link
Contributor

bouwew commented Jan 30, 2023

@ElianKars can you please upgrade to plugwise-beta v0.34.4a0 and test?

@ElianKars
Copy link
Author

Yes, it works! Error is gone and Anna integration is working. You are fantastic! Thank you very much for your speedy help, @bouwew :)

@bouwew
Copy link
Contributor

bouwew commented Jan 30, 2023

Very good, thanks for testing and reporting!
I'll release the related updates.

@bouwew
Copy link
Contributor

bouwew commented Jan 30, 2023

Solved via #341

@bouwew bouwew closed this as completed Jan 30, 2023
bouwew added a commit that referenced this issue Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants