jomwells / ambihue

ON/OFF Abilight+Hue (Switch) component for Philips Ambilight TV's
9 stars 9 forks source link

Everything working(?) but lots of error messages in log #7

Open Rikkie80 opened 3 years ago

Rikkie80 commented 3 years ago

Since a couple of days my log is flooded with error messages:

2020-11-10 11:09:22 ERROR (MainThread) [homeassistant.helpers.entity] Update for switch.ambilight_hue fails
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state
    await self.async_device_update()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 474, in async_device_update
    raise exc
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/philips_ambilight+hue/switch.py", line 91, in update
    self.getState()
  File "/config/custom_components/philips_ambilight+hue/switch.py", line 81, in getState
    ahstat = fullstate['values'][0]['value']['data']['value']
KeyError: 'data'

I'm running HA 0.117.5 and my TV is an 65OLED854 on TPM191E _ 101.001.079.005

Rikkie80 commented 3 years ago

Ok, think I found it...

After the last TV update it seems that the ID for "ambilight_hue_off" changed to 2131230783... So my switch configuration is now:

- platform: philips_ambilight+hue
  name: Ambilight+Hue
  host: !secret tv_woonkamer
  username: !secret tv_username
  password: !secret tv_password
  id: 2131230783
  scan_interval: 5