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

Integration won't load #2

Open
nkm8 opened this issue Apr 26, 2021 · 0 comments
Open

Integration won't load #2

nkm8 opened this issue Apr 26, 2021 · 0 comments

Comments

@nkm8
Copy link

nkm8 commented Apr 26, 2021

Describe the Bug
I configured the integration and receive this error on every restart.

The Error

Logger: homeassistant.helpers.entity
Source: custom_components/channels_dvr_recently_recorded/sensor.py:128
First occurred: 10:18:21 PM (1 occurrences)
Last logged: 10:18:21 PM

Update for sensor.dvr_recently_recorded fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 292, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 490, in async_device_update
    raise exc
  File "/config/custom_components/channels_dvr_recently_recorded/sensor.py", line 127, in async_update
    recordings.sort(
  File "/config/custom_components/channels_dvr_recently_recorded/sensor.py", line 128, in <lambda>
    reverse=True, key=lambda x: parse(x["Airing"]["Raw"]["startTime"])
KeyError: 'startTime'

Indicate if you followed all steps in the troubleshooting doc
Yes

What data does the sensor display if any?
N/A

Home Assistant Version
core-2021.4.6

Additional Context
Removing these 3 lines solves the error and causes the integration to load and work as expected:

recordings.sort(
reverse=True, key=lambda x: parse(x["Airing"]["Raw"]["startTime"])
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant