Closed martin3000 closed 3 months ago
I am not getting this error but I get
WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.soil_v2_26_raw (<class 'custom_components.thethingsnetwork.TTN_client.TtnDataSensor'>) is using self.async_update_ha_state(), without enabling force_update. Instead it should use self.async_write_ha_state(), please create a bug report at https://github.com/angelnu/home_assistant_thethingsnetwork/issues
This was reported with #17
I will look at fixing this one and see if that helps with your case as well.
I just found that I have this error only with 2 devices from 7. Maybe it is because I renamed a device or a sensor?
I changed the code in TTN_client.py and this seems to fix it:
async def async_set_state(self, value):
if self.hass: # jms
self._state = value
await self.async_update_ha_state()
Thanks @martin3000 - I added the deprecation fix and your check at https://github.com/angelnu/home_assistant_thethingsnetwork/commit/ccf6fb6e1086817d5c00ca86d1bc06839e056c7a
Please let me know if that fixes the issue
Thank you, its ok now
After every fetch of data from TTN, there is this error in the log:
The sensor data is there, it is not missing.