I want to add support for the Sinopé light switch and dimmer. I’m almost there but still having an error in the log:
2018-01-08 23:03:32 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/lib/python3.6/asyncio/tasks.py", line 180, in _step
result = coro.send(None)
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
new_entity, self, update_before_add=update_before_add
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
yield from entity.async_update_ha_state()
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 210, in async_update_ha_state
state = self.state
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 360, in state
return STATE_ON if self.is_on else STATE_OFF
File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 365, in is_on
raise NotImplementedError()
The error occur when I’m reading the switch state. Do I need to add code directly in HA ? in entity.py ?
Also I’ve created it as a switch component. Is it better to make it as a light component ?
Thank You