HDMI CEC still not working on 0.38

Here is the log from first boot after turning on hdmi_cec

17-02-11 17:05:27 INFO (Thread-7) [homeassistant.util.package] Attempting install of pyCEC==0.4.13
17-02-11 17:05:40 INFO (MainThread) [homeassistant.bootstrap] Setting up hdmi_cec
17-02-11 17:05:40 ERROR (MainThread) [homeassistant.bootstrap] Error during setup of component hdmi_cec
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/bootstrap.py”, line 152, in _async_setup_component
None, component.setup, hass, config)
File “/usr/lib/python3.4/asyncio/futures.py”, line 388, in iter
yield self # This tells Task to wait for completion.
File “/usr/lib/python3.4/asyncio/tasks.py”, line 286, in _wakeup
value = future.result()
File “/usr/lib/python3.4/asyncio/futures.py”, line 277, in result
raise self._exception
File “/usr/lib/python3.4/concurrent/futures/thread.py”, line 54, in run
result = self.fn(*self.args, **self.kwargs)
File “/srv/homeassistant/lib/python3.4/site-packages/homeassistant/components/hdmi_cec.py”, line 189, in setup
adapter = CecAdapter(name=display_name, activate_source=False)
File “/home/homeassistant/.homeassistant/deps/pycec/cec.py”, line 20, in init
import cec
ImportError: No module named ‘cec’

Same here. It worked fine on 0.36.x. Been getting errors on it with 0.37.x and 0.38.x

Looks like you need to switch back to using the old style customization to get it to work, even if your customization has nothing to do with HDMI-CEC. For example,

sensor.pws_temp_f:
  friendly_name: Outside Temp
  icon: mdi:thermometer
sensor.pws_wind_mph:
  friendly_name: Wind Speed
  icon: mdi:weather-windy

That is fixed now.

I have been experimenting with the HDMI CEC component all the weekend. But when I changed to use the command line switch component and using the cec-client directly, it worked much better. My conclusion was that the python cec lib was failing sometimes.

But I could be wrong.