Skip to content

Commit

Permalink
Relax check for heading
Browse files Browse the repository at this point in the history
  • Loading branch information
jhansche authored Nov 27, 2023
1 parent 0f7443e commit 0781132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/teslafi/device_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def extra_state_attributes(self) -> dict[str, Any]:
"""Return entity specific state attributes."""
heading = (
int(h)
if (h := self.coordinator.data.get("heading", None)) is not None
if (h := self.coordinator.data.get("heading", None))
else None
)
cardinal = _degrees_to_cardinal(heading) if heading is not None else None
Expand Down

1 comment on commit 0781132

@jhansche
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit fixes #11

Please sign in to comment.