Don't try to resolve state if native_value is Null (#67134)

This commit is contained in:
soluga
2022-02-24 01:29:26 +01:00
committed by GitHub
parent a5383e40eb
commit 79bdd71da7

View File

@@ -152,6 +152,7 @@ class WolfLinkState(WolfLinkSensor):
def native_value(self):
"""Return the state converting with supported values."""
state = super().native_value
if state is not None:
resolved_state = [
item for item in self.wolf_object.items if item.value == int(state)
]