Error every few seconds

I’m on Home Asst 0.76.2. I’m getting the error below repeatedly. This is a fairly new HA install, and I haven’t tried to manually configure anything for Directv, and I haven’t tried to install anything for Directv. I get the error even if all my Directv boxes are turned on.

2018-08-25 10:35:13 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 217, in async_update_ha_state
    attr = self.state_attributes or {}
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/__init__.py", line 946, in state_attributes
    in ATTR_TO_PROPERTY if getattr(self, attr) is not None
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/__init__.py", line 946, in 
    in ATTR_TO_PROPERTY if getattr(self, attr) is not None
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/media_player/directv.py", line 122, in media_content_id
    return self._current['programId']
KeyError: 'programId'

Can someone get me pointed in the right direction on resolving this error? Thanks.

I was able to fix this by changing the settings on my DVR.

Go to Settings -> Whole Home -> External Devices. Set everything to Allow/Share. In this case make sure Current Program is set to Allow.

1 Like

That’s good to know, thank you. I did resolve it by just turning off discovery for directv in configuration.yaml:

discovery:
  ignore:
    - directv

The media player for directv never worked for me any way. To control my directv box, I just send rest commands, and its very responsive that way.