Skip to content

Commit

Permalink
Ignore streaming None
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Nov 10, 2024
1 parent 3ab0998 commit e466b55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion custom_components/teslemetry/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -1175,7 +1175,8 @@ def _async_update_attrs(self) -> None:
def _async_value_from_stream(self, value) -> None:
"""Update the value of the entity."""
self._attr_available = True
self._attr_native_value = self.entity_description.value_fn(auto_type(value))
if value := auto_type(value) is not None:
self._attr_native_value = self.entity_description.value_fn(value)


class TeslemetryVehicleTimeSensorEntity(TeslemetryVehicleEntity, SensorEntity):
Expand Down

0 comments on commit e466b55

Please sign in to comment.