Fix Starline sensor state AttributeError (#55654)

* Fix starline sensors state

* Black
This commit is contained in:
Nikolay Vasilchuk 2021-09-03 15:04:56 +03:00 committed by GitHub
parent 70338da50e
commit b4d4fe4ef8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,8 @@ async def async_setup_entry(hass, entry, async_add_entities):
sensor
for device in account.api.devices.values()
for description in SENSOR_TYPES
if (sensor := StarlineSensor(account, device, description)).state is not None
if (sensor := StarlineSensor(account, device, description)).native_value
is not None
]
async_add_entities(entities)