From cd55138c4607e337c8584fe1176f03b02504d160 Mon Sep 17 00:00:00 2001 From: Dag Stuan Date: Wed, 1 Nov 2023 07:04:38 +0100 Subject: [PATCH 1/3] fix: fix range attributes from Teslamate (#759) closes #740 --- custom_components/tesla_custom/teslamate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/tesla_custom/teslamate.py b/custom_components/tesla_custom/teslamate.py index 74c4e668..be6c0675 100644 --- a/custom_components/tesla_custom/teslamate.py +++ b/custom_components/tesla_custom/teslamate.py @@ -138,8 +138,9 @@ def cast_car_state(state: str, car: TeslaCar) -> (str, str): MAP_CHARGE_STATE = { "battery_level": ("battery_level", float), - "est_battery_range_km": ("battery_range", cast_km_to_miles), - "usable_battery_level": ("usable_battery_level", float), + "rated_battery_range_km": ("battery_range", cast_km_to_miles), + "est_battery_range_km": ("est_battery_range", cast_km_to_miles), + "ideal_battery_range_km": ("ideal_battery_range", cast_km_to_miles), "charge_energy_added": ("charge_energy_added", float), "charger_actual_current": ("charger_actual_current", int), "charger_power": ("charger_power", int), From 23928a0173858ba2457d167d0a18c4938b44b31a Mon Sep 17 00:00:00 2001 From: Dag Stuan Date: Sun, 5 Nov 2023 21:33:38 +0100 Subject: [PATCH 2/3] fix: Re-add usable_battery_level from mqtt (#760) --- custom_components/tesla_custom/teslamate.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/tesla_custom/teslamate.py b/custom_components/tesla_custom/teslamate.py index be6c0675..b8358fd5 100644 --- a/custom_components/tesla_custom/teslamate.py +++ b/custom_components/tesla_custom/teslamate.py @@ -141,6 +141,7 @@ def cast_car_state(state: str, car: TeslaCar) -> (str, str): "rated_battery_range_km": ("battery_range", cast_km_to_miles), "est_battery_range_km": ("est_battery_range", cast_km_to_miles), "ideal_battery_range_km": ("ideal_battery_range", cast_km_to_miles), + "usable_battery_level": ("usable_battery_level", float), "charge_energy_added": ("charge_energy_added", float), "charger_actual_current": ("charger_actual_current", int), "charger_power": ("charger_power", int), From b77e94a1023ce78556f5abbe1669da3d6126b1eb Mon Sep 17 00:00:00 2001 From: Nitin <91310284+nitin-pandita@users.noreply.github.com> Date: Mon, 6 Nov 2023 02:05:32 +0530 Subject: [PATCH 3/3] docs(grammatical): correct typos and improve grammar (#755) --- CONTRIBUTING.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 01a2a406..965f36b7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -16,7 +16,7 @@ Pull requests are the best way to propose changes to the codebase. 1. Fork the repo and create your branch from `main`. 2. If you've changed something, update the documentation. 3. Make sure your code lints (using black). -4. Test you contribution. +4. Test your contribution. 5. Issue that pull request! ## Any contributions you make will be under the Apache License @@ -30,7 +30,7 @@ Report a bug by [opening a new issue](../../issues/new/choose); it's that easy! ## Write bug reports with detail, background, and sample code -**Great Bug Reports** tend to have: +**Great Bug Reports** typically have: - A quick summary and/or background - Steps to reproduce @@ -50,7 +50,7 @@ Use [black](https://github.com/ambv/black) to make sure the code follows the sty This custom integration is based on [integration_blueprint template](https://github.com/custom-components/integration_blueprint). -It comes with development environment in a container, easy to launch +It comes with development environment in a container that is easy to launch if you use Visual Studio Code. With this container you will have a stand alone Home Assistant instance running and already configured with the included [`.devcontainer/configuration.yaml`](./.devcontainer/configuration.yaml)