RogerSelwyn / Home_Assistant_SkyQ_MediaPlayer

Home Assistant SkyQ Media player component
MIT License
101 stars 17 forks source link

used storage broken after upgrading to 2.10 #127

Closed toddstar closed 1 year ago

toddstar commented 1 year ago

Getting the following error with the latest update

Source: custom_components/skyq/utils.py:114
Integration: Sensor (documentation, issues)
First occurred: 00:00:24 (3 occurrences)
Last logged: 00:04:50

Error while setting up skyq platform for sensor
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 281, in _async_setup_platform
    await asyncio.shield(task)
  File "/config/custom_components/skyq/sensor.py", line 56, in async_setup_entry
    sensors = [SkyQUsedStorage(hass, remote, config)]
  File "/config/custom_components/skyq/sensor.py", line 73, in __init__
    attributes = read_state(
  File "/config/custom_components/skyq/utils.py", line 114, in read_state
    if sensor[STORAGE_SENSOR] == sensor_type:
KeyError: 'sensor'

Also not seeing the new schedule sensor either.

Edit: So multiple restarts didnt work but redownloading in hacs has fixed the issue; was actually trying to go back a version to check if storage was still working on that but accidentally redownloaded 2.10 and now storage is working and have the new schedule sensor