Skip to content

Commit

Permalink
fix device tracker
Browse files Browse the repository at this point in the history
  • Loading branch information
Bre77 committed Dec 23, 2024
1 parent 81763f8 commit 865e5ee
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions custom_components/teslemetry/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ def __init__(

def _async_value_from_stream(self, value) -> None:
"""Update the value of the entity."""
if isinstance(value, dict):
self._attr_latitude = value["latitude"]
self._attr_longitude = value["longitude"]
self._attr_available = True
self._attr_available = False
self._attr_available = isinstance(value, dict)
self._attr_latitude = value.get("latitude")
self._attr_longitude = value.get("longitude")

0 comments on commit 865e5ee

Please sign in to comment.