I’ve got a couple of the above errors in my log and wonder what needs to change to resolve them. I’m using “platform: min_max”, not sure whether the error is related. Examples with context:
(attempt to copy/paste/format in proper way for this forum; excuses if i did not succeed)
‘’’
2020-09-05 11:39:28 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.door_window_sensor_158d00022d0129_battery_level fails
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 263, in async_update_ha_state
await self.async_device_update()
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 454, in async_device_update
await self.async_update() # type: ignore
File “/usr/lib/python3.7/asyncio/coroutines.py”, line 120, in coro
res = func(*args, **kw)
File “/home/homeassistant/.homeassistant/custom_components/attributes/sensor.py”, line 231, in async_update
self._name = device_friendly_name
UnboundLocalError: local variable ‘device_friendly_name’ referenced before assignment
2020-09-05 11:39:28 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.door_window_sensor_158d00022da144_battery_level fails
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 263, in async_update_ha_state
await self.async_device_update()
File “/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity.py”, line 454, in async_device_update
await self.async_update() # type: ignore
File “/usr/lib/python3.7/asyncio/coroutines.py”, line 120, in coro
res = func(*args, **kw)
File “/home/homeassistant/.homeassistant/custom_components/attributes/sensor.py”, line 231, in async_update
self._name = device_friendly_name
UnboundLocalError: local variable ‘device_friendly_name’ referenced before assignment
‘’’