Skip to content

Commit

Permalink
Merge pull request #190 from sfstar/feature/add_low_temperature_senso…
Browse files Browse the repository at this point in the history
…r_battery_state_as_decodable_value

create an set of integer values for the can i decode this test
  • Loading branch information
sfstar authored Mar 18, 2024
2 parents c9c696e + 6927b0d commit 25c2b00
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 25c2b00

Please sign in to comment.