Skip to content

Commit

Permalink
Merge pull request #660 from alandtse/dev
Browse files Browse the repository at this point in the history
chore: release 2023-07-07
  • Loading branch information
alandtse authored Jul 7, 2023
2 parents 7b94ce8 + dc68774 commit c0a9d87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ repos:
- id: commitizen
stages: ["commit-msg"]
repo: https://github.com/commitizen-tools/commitizen
rev: 3.2.2
rev: 3.5.2
# --- Linters ---
- hooks:
- id: dockerfile_lint
Expand All @@ -61,7 +61,7 @@ repos:
)$
rev: v3.0.0-alpha.9-for-vscode
- repo: https://github.com/asottile/pyupgrade
rev: v3.6.0
rev: v3.8.0
hooks:
- id: pyupgrade
args: [--py38-plus]
Expand Down Expand Up @@ -92,7 +92,7 @@ repos:
# pass_filenames: false
# always_run: true
- repo: https://github.com/floatingpurr/sync_with_poetry
rev: "1.0.0" # the revision or tag to clone at
rev: "1.1.0" # the revision or tag to clone at
hooks:
- id: sync_with_poetry
args: [] # optional args
Expand Down
3 changes: 3 additions & 0 deletions custom_components/tesla_custom/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,9 @@ def extra_state_attributes(self):
"Energy at arrival": self._car.active_route_energy_at_arrival,
"Minutes traffic delay": minutes,
"Destination": self._car.active_route_destination,
"Minutes to arrival": round(
float(self._car.active_route_minutes_to_arrival), 2
),
}


Expand Down
4 changes: 4 additions & 0 deletions tests/test_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,10 @@ async def test_arrival_time(hass: HomeAssistant, monkeypatch: MonkeyPatch) -> No
state.attributes.get("Destination")
== car_mock_data.VEHICLE_DATA["drive_state"]["active_route_destination"]
)
assert state.attributes.get("Minutes to arrival") == round(
car_mock_data.VEHICLE_DATA["drive_state"]["active_route_minutes_to_arrival"],
2,
)


async def test_distance_to_arrival(hass: HomeAssistant) -> None:
Expand Down

0 comments on commit c0a9d87

Please sign in to comment.