skodaconnect / homeassistant-skodaconnect

Skoda Connect - A home assistant plugin to add integration with your car
Apache License 2.0
232 stars 28 forks source link

Errors after update to 1.0.23 #6

Closed bruxy70 closed 3 years ago

bruxy70 commented 3 years ago

Environment

Describe the bug

Errors in the log

Steps to Reproduce

Restart, check logs

Expected behavior

Not sure if this impact functionality. I was actually checking logs for my own integration I maintain, and I noticed the errors below.

Screenshots

Traceback/Error logs

  File "/usr/local/lib/python3.8/site-packages/dashboardskoda.py", line 126, in state
    if val and self.unit and "mi" in self.unit and self.convert == True:
AttributeError: 'Sensor' object has no attribute 'convert'

  File "/usr/local/lib/python3.8/site-packages/dashboardskoda.py", line 134, in state
    elif val and self.unit and "°C" in self.unit and self.convert == True:
AttributeError: 'Sensor' object has no attribute 'convert'

Exception in async_write_ha_state when dispatching 'skodaconnect.updated': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state sstate = self.state File "/config/custom_components/skodaconnect/sensor.py", line 27, in state return self.instrument.state File "/usr/local/lib/python3.8/site-packages/dashboardskoda.py", line 134, in state elif val and self.unit and "°C" in self.unit and self.convert == True: AttributeError: 'Sensor' object has no attribute 'convert'
Exception in async_write_ha_state when dispatching 'skodaconnect.updated': () Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state sstate = self.state File "/config/custom_components/skodaconnect/sensor.py", line 27, in state return self.instrument.state File "/usr/local/lib/python3.8/site-packages/dashboardskoda.py", line 126, in state if val and self.unit and "mi" in self.unit and self.convert == True: AttributeError: 'Sensor' object has no attribute 'convert'

Additional context

Farfar commented 3 years ago

Should be resolved in version 1.0.24

bruxy70 commented 3 years ago

Thanks