burnnat / ha-hdhomerun

HDHomeRun integration for Home Assistant.
MIT License
15 stars 6 forks source link

Error on device update: 'active = next(x for x in streaminfo if x.program == program)' #9

Open jamieshaw opened 4 years ago

jamieshaw commented 4 years ago

Attempting to load the HDHomeRun sensor causes the following traceback. HDHR libraries are installed and can be accessed via hdhomerun_config binary.

Not sure if there is something I'm missing…

Traceback

2020-05-09 09:56:44 ERROR (MainThread) [homeassistant.components.sensor] hdhomerun: Error on device update!
Traceback (most recent call last):
  File "/home/administrator/.homeassistant/custom_components/hdhomerun/sensor.py", line 77, in async_update
    self._state = self.fetch_channel()
  File "/home/administrator/.homeassistant/custom_components/hdhomerun/sensor.py", line 82, in fetch_channel
    return self.fetch_channel_raw()
  File "/home/administrator/.homeassistant/custom_components/hdhomerun/sensor.py", line 119, in fetch_channel_raw
    active = next(x for x in streaminfo if x.program == program)
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/administrator/.pyenv/versions/3.7.5/envs/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 322, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/home/administrator/.pyenv/versions/3.7.5/envs/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py", line 470, in async_device_update
    await self.async_update()
RuntimeError: coroutine raised StopIteration
jamieshaw commented 4 years ago

Just to further add to debugging:

/sys/model

hdhomerun4_dvbt

/sys/hwmodel

HDHR4-2DT

/sys/version

20200225

/sys/debug

mem: nbk=2 dmk=245
loop: pkt=0
t0: pt=11 cal=-4965
t1: pt=11 cal=-4990
eth: link=100f

/sys/features

channelmap: eu-bcast au-bcast tw-bcast
modulation: t8dvbt2 t7dvbt2 t6dvbt2 t8dvbt t7dvbt t6dvbt
auto-modulation: auto auto8t auto7t auto6t