Skip to content

Commit

Permalink
create an set of integer values for the can i decode this test
Browse files Browse the repository at this point in the history
  • Loading branch information
sfstar committed Mar 18, 2024
1 parent 0cc1ccf commit 6927b0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/victron/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def _handle_coordinator_update(self) -> None:
if self.available:
data = self.description.value_fn(self.coordinator.processed_data(), self.description.slave, self.description.key)
if self.entity_type is not None and isinstance(self.entity_type, TextReadEntityType):
if data in set(self.entity_type.decodeEnum):
if data in set(item.value for item in self.entity_type.decodeEnum):
self._attr_native_value = self.entity_type.decodeEnum(data).name.split("_DUPLICATE")[0]
else:
self._attr_native_value = "NONDECODABLE"
Expand Down

0 comments on commit 6927b0d

Please sign in to comment.