EVcharge Process 1st real run

This commit is contained in:
2025-02-08 18:18:43 +01:00
parent 41c3a4fef1
commit 16c381cadb

View File

@@ -105,19 +105,18 @@ variables:
# here list of mobile APP to be notified # here list of mobile APP to be notified
recipient_list: recipient_list:
- notify.mobile_app_ttrabatt_iphone15 - notify.mobile_app_ttrabatt_iphone15
#- notify.mobile_app_emanuele_s24 - notify.mobile_app_emanuele_s24
actions: actions:
- if: - if:
- or: - or:
- condition: template - condition: template
#value_template: "{{ is_state(evcharge_entity1_var, 'on') }}" value_template: "{{ is_state(evcharge_entity1_var, 'on') }}"
# TEST ONLY: value_template: "{{ false }}" # TEST ONLY: value_template: "{{ false }}"
value_template: "{{ false }}"
- condition: template - condition: template
#value_template: "{{ is_state(evcharge_entity2_var, 'on') }}" value_template: "{{ is_state(evcharge_entity2_var, 'on') }}"
# TEST ONLY: value_template: "{{ false }}" # TEST ONLY: value_template: "{{ false }}"
value_template: "{{ false }}"
then: then:
# charge already active, send message and terminate # charge already active, send message and terminate
repeat: repeat:
@@ -153,25 +152,24 @@ actions:
# Start plug1 and wait until power measured is below input_number.evcharge_no_charge_threshold for 10 minutes = 600 seconds # Start plug1 and wait until power measured is below input_number.evcharge_no_charge_threshold for 10 minutes = 600 seconds
- action: switch.turn_on - action: switch.turn_on
# entity_id: !input evcharge_entity1 entity_id: !input evcharge_entity1
# TEST ONLY: entity_id: switch.presa_smart_1 # TEST ONLY: entity_id: switch.presa_smart_1
entity_id: switch.presa_smart_1
# need to wait car to start charging # need to wait car to start charging
#- delay: 60 - delay: 120
# TEST ONLY: - delay: 10 # TEST ONLY: - delay: 10
- delay: 10
- repeat: - repeat:
# until: "{{ ( states(evcharge_entity1_power_var) | int ) < ( states('input_number.evcharge_no_charge_threshold') | int ) }}" until: "{{ ( states(evcharge_entity1_power_var) | int ) < ( states('input_number.evcharge_no_charge_threshold') | int ) }}"
until: "{{ ( states('input_number.test_evcharge_front') | int) < (states('input_number.evcharge_no_charge_threshold') | int) }}" # TEST ONLY: until: "{{ ( states('input_number.test_evcharge_front') | int) < (states('input_number.evcharge_no_charge_threshold') | int) }}"
sequence: sequence:
- delay: 60 - delay: 60
- action: switch.turn_off - action: switch.turn_off
# entity_id: !input evcharge_entity1 entity_id: !input evcharge_entity1
# TEST ONLY: entity_id: switch.presa_smart_1 # TEST ONLY: entity_id: switch.presa_smart_1
entity_id: switch.presa_smart_1
- repeat: - repeat:
for_each: "{{ recipient_list }}" for_each: "{{ recipient_list }}"
@@ -185,9 +183,9 @@ actions:
title: EV Charge process title: EV Charge process
# wait couple of minutes before starting charge on plug2 # wait couple of minutes before starting charge on plug2
#- delay: 120 - delay: 120
# TEST ONLY: - delay: 10 # TEST ONLY: - delay: 10
- delay: 10
- if: - if:
- condition: template - condition: template
value_template: "{{ is_state(use_entity2_var, 'on') }}" value_template: "{{ is_state(use_entity2_var, 'on') }}"
@@ -205,27 +203,27 @@ actions:
"EVcharge process on {{ evcharge_entity2_var }} has started" "EVcharge process on {{ evcharge_entity2_var }} has started"
title: EV Charge process title: EV Charge process
# turn_on evcharge_entity1 # turn_on evcharge_entity2
- action: switch.turn_on - action: switch.turn_on
# entity_id: !input evcharge_entity1 entity_id: !input evcharge_entity2
# TEST ONLY: entity_id: switch.presa_smart_2 # TEST ONLY: entity_id: switch.presa_smart_2
entity_id: switch.presa_smart_2
# need to wait car to start charging # need to wait car to start charging
#- delay: 120 - delay: 120
# TEST ONLY: - delay: 10 # TEST ONLY: - delay: 10
- delay: 10
- repeat: - repeat:
# until: "{{ ( states(evcharge_entity2_power_var) | int ) < ( states('input_number.evcharge_no_charge_threshold') | int) }}" until: "{{ ( states(evcharge_entity2_power_var) | int ) < ( states('input_number.evcharge_no_charge_threshold') | int) }}"
until: "{{ ( states('input_number.test_evcharge_back') | int) < ( states('input_number.evcharge_no_charge_threshold') | int) }}" # until: "{{ ( states('input_number.test_evcharge_back') | int) < ( states('input_number.evcharge_no_charge_threshold') | int) }}"
sequence: sequence:
- delay: 60 - delay: 60
- action: switch.turn_off - action: switch.turn_off
# entity_id: !input evcharge_entity2 entity_id: !input evcharge_entity2
# TEST ONLY: entity_id: switch.presa_smart_2 # TEST ONLY: entity_id: switch.presa_smart_2
entity_id: switch.presa_smart_2
- repeat: # send message to all recipient-list member - repeat: # send message to all recipient-list member
for_each: "{{ recipient_list }}" for_each: "{{ recipient_list }}"