Skip to content

Commit 25c2b00

Browse files
author
sfstar
authored
Merge pull request #190 from sfstar/feature/add_low_temperature_sensor_battery_state_as_decodable_value
create an set of integer values for the can i decode this test
2 parents c9c696e + 6927b0d commit 25c2b00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/victron/sensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def _handle_coordinator_update(self) -> None:
156156
if self.available:
157157
data = self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)
158158
if self.entity_type is not None and isinstance(self.entity_type, TextReadEntityType):
159-
if data in set(self.entity_type.decodeEnum):
159+
if data in set(item.value for item in self.entity_type.decodeEnum):
160160
self._attr_native_value = self.entity_type.decodeEnum(data).name.split("_DUPLICATE")[0]
161161
else:
162162
self._attr_native_value = "NONDECODABLE"

0 commit comments

Comments
 (0)