home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.15k stars 31.13k forks source link

0.66 Mysensors sensor entities broken #13573

Closed moskovskiy82 closed 6 years ago

moskovskiy82 commented 6 years ago

Upon upgrading from 0.65 to 0.66 get the following in the logs


Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 227, in async_update_ha_state
    unit_of_measurement = self.unit_of_measurement
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/mysensors.py", line 73, in unit_of_measurement
    unit, _ = self._get_sensor_type()
TypeError: 'NoneType' object is not iterable
2018-03-31 11:22:13 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-03-31 11:22:14 ERROR (SyncWorker_13) [homeassistant.core] Error doing job: Task was destroyed but it is pending!
2018-03-31 11:22:15 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 227, in async_update_ha_state
    unit_of_measurement = self.unit_of_measurement
  File "/srv/homeassistant/lib/python3.6/site-packages/homeassistant/components/sensor/mysensors.py", line 73, in unit_of_measurement
    unit, _ = self._get_sensor_type()
TypeError: 'NoneType' object is not iterable
2018-03-31 11:22:16 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting
2018-03-31 11:22:16 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved

And this is how my climate component for the mysensors looks like now...

image

moskovskiy82 commented 6 years ago

@MartinHjelmare can you check on this please?

MartinHjelmare commented 6 years ago

Thanks for reporting. I've found the bug. It's sensor entities though, that will be affected, and shouldn't be related to your climate entity as long as that isn't templated from a sensor.

moskovskiy82 commented 6 years ago

The node also has a temperature sensor. We have discussed the code here.

MartinHjelmare commented 6 years ago

What is the problem with the climate entity as you see it? Is it the null - null values? If so that's another more general bug, probably related to the frontend: https://github.com/home-assistant/home-assistant-polymer/issues/1051

moskovskiy82 commented 6 years ago

Not only the nulls but also that now i have 4 controls instead of 1. Yes maybe it's related to the home-assistant/home-assistant-polymer#1051

Bottesford commented 6 years ago

This is related I think - After the above error, I'm getting a warning each time the node reports: WARNING (Thread-23) [mysensors] Not a valid message: Not valid message sub-type: 32 for dictionary value @ data['sub_type']

This is coming from my soil moisture sensor. 32 is the value. It is type S_MOISTURE and the message is V_LEVEL. I didn't see S_MOISTURE covered in the unit/icon identifying code. This value should be a percentage.

MartinHjelmare commented 6 years ago

This is not related. Subtype 32 is neither S_MOISTURE or V_LEVEL. I would double check your sketch, for correct child and value types.

If you need more help, please make a post in our forum and tag me.