Skip to content

Commit ae7da4d

Browse files
committed
Get latest conditions from Tesla to update HA as last step before checking these conditions at beginning of repeat loop.
1 parent f6a84de commit ae7da4d

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Tesla_solar_charger_automation.yaml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -849,20 +849,21 @@ action:
849849
- delay: "00:00:00"
850850

851851

852-
# Get the latest data from Tesla to update HA.
853-
- service: button.press
854-
data: {}
855-
target:
856-
entity_id: !input car_button_forceupdate_ha
857-
- delay: "{{ wait_command_execute }}"
858-
859-
# Sleep to ensure HA is updated before the next read.
852+
# Sleep enough to allow solar inverter updates. Should be ok to sleep longer to avoid changing charge current too often.
853+
# Other things can happen during sleep time, eg. car unplugged.
860854
- delay:
861855
hours: 0
862856
minutes: 0
863857
seconds: !input wait_grid_power_net_update
864858
milliseconds: 0
865859

860+
# Get latest conditions from Tesla to update HA as last step before checking these conditions at beginning of repeat loop.
861+
- service: button.press
862+
data: {}
863+
target:
864+
entity_id: !input car_button_forceupdate_ha
865+
- delay: "{{ wait_command_execute }}"
866+
866867
#####################################
867868
# Exit script
868869
#####################################

version.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
Tesla Solar Charger
22
===================
33

4+
v1.1e 13/11/2024
5+
- Get latest conditions from Tesla to update HA as last step before checking these conditions at beginning of repeat loop.
6+
47
v1.1d 7/11/2024
58
- Updated doc.
69
- Setting the charge limit might cause car to turn on charger, so must get latest update before proceeding. Otherwise script can exit without turning off charger.

0 commit comments

Comments
 (0)