I’m using HA v100.1 and unable to run it
I first tried as indicated by copying stib.py into the custom_components/sensor folder. The component is not found. I then (just to try it out without actually believing it would ever work) renamed the stib.py into sensor.py, created a manifest.json and an empty init.py file to mimic the structure of other components to get this:
Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 408, in _async_add_entity await entity.async_update_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 273, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 327, in _async_write_ha_state icon = self.icon File "/config/custom_components/stib/sensor.py", line 113, in icon if self.mode == 'M': AttributeError: 'StibSensor' object has no attribute 'mode'
What would I need to adapt code wise to make it work? This is really a useful component for anybody using the Brussels public transportation and I am sure I am not the only one appreciating the work done so far