EVcharge_PRO: first running test

This commit is contained in:
2025-09-30 00:07:48 +02:00
parent d7b8888fff
commit 0a720e0936
2 changed files with 85 additions and 11 deletions

View File

@@ -160,6 +160,26 @@
domain: mobile_app domain: mobile_app
type: notify type: notify
message: Qualcuno ha suonato al Cancelletto usa Home Assistant message: Qualcuno ha suonato al Cancelletto usa Home Assistant
- device_id: f0ad21f704179a15735313abaa4bd548
domain: mobile_app
type: notify
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
enabled: false
- device_id: 46e6c7b252a23f498de8602ca380d0a9
domain: mobile_app
type: notify
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
enabled: true
- device_id: 163daed9ae6074cfa3a10b866ab5d2e0
domain: mobile_app
type: notify
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
enabled: false
- device_id: 8836f21983cdb6b245d3be58d7acd7d7
domain: mobile_app
type: notify
message: Qualcuno ha suonato al Cancelletto usa Home Assistant
enabled: false
mode: single mode: single
- id: '1756127648616' - id: '1756127648616'
alias: Luce Automatica Scala Taverna alias: Luce Automatica Scala Taverna
@@ -230,3 +250,41 @@
charged_entity1: input_number.evcharge_front_charged charged_entity1: input_number.evcharge_front_charged
charged_entity2: input_number.evcharge_back_charged charged_entity2: input_number.evcharge_back_charged
stop_button: input_button.evcharge_pro_stop stop_button: input_button.evcharge_pro_stop
- id: '1758560143754'
alias: Cancelletto-on
description: ''
triggers:
- type: turned_on
device_id: 3c1785ee92ef67b2536571f4e318db84
entity_id: 34480c273e9378e8582a881acd4a7871
domain: binary_sensor
trigger: device
conditions: []
actions:
- action: input_boolean.turn_on
metadata: {}
data: {}
target:
entity_id: input_boolean.cancelletto_video_duration
mode: single
- id: '1758560334981'
alias: Cancelletto-off
description: ''
triggers:
- type: turned_off
device_id: 3c1785ee92ef67b2536571f4e318db84
entity_id: 34480c273e9378e8582a881acd4a7871
domain: binary_sensor
trigger: device
for:
hours: 0
minutes: 1
seconds: 0
conditions: []
actions:
- action: input_boolean.turn_off
metadata: {}
data: {}
target:
entity_id: input_boolean.cancelletto_video_duration
mode: single

View File

@@ -96,6 +96,8 @@ variables:
use_entity1_var: !input use_entity1 use_entity1_var: !input use_entity1
use_entity2_var: !input use_entity2 use_entity2_var: !input use_entity2
charged_entity1_var: !input charged_entity1
charged_entity2_var: !input charged_entity2
# here list of mobile APP to be notified # here list of mobile APP to be notified
recipient_list_notification: recipient_list_notification:
@@ -164,6 +166,12 @@ actions:
- variables: - variables:
energy1_before: "{{ states(evcharge_entity1_energy_var) | float | round(2) }}" energy1_before: "{{ states(evcharge_entity1_energy_var) | float | round(2) }}"
- action: input_number.set_value
target:
entity_id: "{{ charged_entity1_var }}"
data:
value: 0.00
# 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
@@ -187,12 +195,13 @@ actions:
energy1_while: "{{ states(evcharge_entity1_energy_var) }}" energy1_while: "{{ states(evcharge_entity1_energy_var) }}"
evcharge_entity1_energy_charged: "{{ ((energy1_while | float| round(2)) - energy1_before )| float | round(2) }}" evcharge_entity1_energy_charged: "{{ ((energy1_while | float| round(2)) - energy1_before )| float | round(2) }}"
- action: homeassistant.update_entity - action: input_number.set_value
target:
entity_id: "{{ charged_entity1_var }}"
data: data:
entity_id: "input_number.evcharge_front_charged" value: "{{ evcharge_entity1_energy_charged }}"
state: "{{ evcharge_entity1_energy_charged }}"
- delay: 120 - delay: 30
# - delay: 10 # TEST ONLY # - delay: 10 # TEST ONLY
# take energy counter after charging # take energy counter after charging
@@ -226,8 +235,8 @@ actions:
"EVcharge process on {{ evcharge_entity1_var }} has ended: {{ ( energy1_after - energy1_before ) | round(2) }} kW/h charged" "EVcharge process on {{ evcharge_entity1_var }} has ended: {{ ( energy1_after - energy1_before ) | round(2) }} kW/h charged"
# wait couple of minutes before starting charge on plug2 # wait couple of minutes before starting charge on plug2
# - delay: 120 - delay: 120
- delay: 10 # TEST ONLY # - delay: 10 # TEST ONLY
- if: - if:
- condition: template - condition: template
value_template: "{{ is_state(use_entity2_var, 'on') }}" value_template: "{{ is_state(use_entity2_var, 'on') }}"
@@ -254,6 +263,12 @@ actions:
- variables: - variables:
energy2_before: "{{ states(evcharge_entity2_energy_var) | float | round(2) }}" energy2_before: "{{ states(evcharge_entity2_energy_var) | float | round(2) }}"
- action: input_number.set_value
target:
entity_id: "{{ charged_entity2_var }}"
data:
value: 0.00
# turn_on evcharge_entity2 # turn_on evcharge_entity2
- action: switch.turn_on - action: switch.turn_on
entity_id: !input evcharge_entity2 entity_id: !input evcharge_entity2
@@ -274,14 +289,15 @@ actions:
sequence: sequence:
- variables: - variables:
energy2_while: "{{ states(evcharge_entity2_energy_var) }}" energy2_while: "{{ states(evcharge_entity2_energy_var) }}"
evcharge_entity1_energy_charged: "{{ ((energy2_while | float| round(2)) - energy2_before )| float | round(2) }}" evcharge_entity2_energy_charged: "{{ ((energy2_while | float| round(2)) - energy2_before )| float | round(2) }}"
- action: homeassistant.update_entity - action: input_number.set_value
target:
entity_id: "{{ charged_entity2_var }}"
data: data:
entity_id: "input_number.evcharge_back_charged" value: "{{ evcharge_entity2_energy_charged }}"
state: "{{ evcharge_entity2_energy_charged }}"
- delay: 120 - delay: 30
# - delay: 10 # TEST ONLY # - delay: 10 # TEST ONLY
# take energy counter after charging # take energy counter after charging