Skip to content

Commit c81ec15

Browse files
authored
Don't log warning for enum sensors when receiving configured unknown_value. (#88)
1 parent 197f499 commit c81ec15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/connectlife/sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def update_state(self):
9595
if self.device_class == SensorDeviceClass.ENUM:
9696
if value in self.options_map:
9797
value = self.options_map[value]
98-
else:
98+
elif value != self.unknown_value:
9999
_LOGGER.warning("Got unexpected value %d for %s (%s)", value, self.status, self.nickname)
100100
value = None
101101
self._attr_native_value = value if value != self.unknown_value else None

0 commit comments

Comments
 (0)