Compare commits
2 Commits
e78ab513f5
...
4c0903c690
| Author | SHA1 | Date | |
|---|---|---|---|
| 4c0903c690 | |||
| 8ec1110473 |
@@ -96,51 +96,6 @@
|
|||||||
input:
|
input:
|
||||||
light_target:
|
light_target:
|
||||||
device_id: e0397b54f1c2d1514be403e2996ca368
|
device_id: e0397b54f1c2d1514be403e2996ca368
|
||||||
- id: '1738142303265'
|
|
||||||
alias: test-pulsante1
|
|
||||||
description: ''
|
|
||||||
triggers:
|
|
||||||
- trigger: mqtt
|
|
||||||
topic: zigbee2mqtt/Pulsante-01
|
|
||||||
payload: single
|
|
||||||
value_template: '{{ value_json[''action''] }}'
|
|
||||||
id: Pulsante1-single
|
|
||||||
- trigger: mqtt
|
|
||||||
topic: zigbee2mqtt/Pulsante-01
|
|
||||||
payload: double
|
|
||||||
value_template: '{{ value_json[''action''] }}'
|
|
||||||
id: Pulsante1-double
|
|
||||||
conditions: []
|
|
||||||
actions:
|
|
||||||
- choose:
|
|
||||||
- conditions:
|
|
||||||
- condition: trigger
|
|
||||||
id:
|
|
||||||
- Pulsante1-single
|
|
||||||
sequence:
|
|
||||||
- action: light.turn_on
|
|
||||||
metadata: {}
|
|
||||||
data:
|
|
||||||
rgb_color:
|
|
||||||
- 255
|
|
||||||
- 0
|
|
||||||
- 0
|
|
||||||
brightness_pct: 100
|
|
||||||
transition: 10
|
|
||||||
target:
|
|
||||||
device_id: '{{ device_id(''light.test_lamp1'')}}'
|
|
||||||
- conditions:
|
|
||||||
- condition: trigger
|
|
||||||
id:
|
|
||||||
- Pulsante1-double
|
|
||||||
sequence:
|
|
||||||
- action: light.turn_off
|
|
||||||
metadata: {}
|
|
||||||
data:
|
|
||||||
transition: 10
|
|
||||||
target:
|
|
||||||
device_id: '{{ device_id(''light.test_lamp1'')}}'
|
|
||||||
mode: queued
|
|
||||||
- id: '1738366774549'
|
- id: '1738366774549'
|
||||||
alias: Test-motion-light-ng
|
alias: Test-motion-light-ng
|
||||||
description: ''
|
description: ''
|
||||||
@@ -152,3 +107,23 @@
|
|||||||
light_target:
|
light_target:
|
||||||
device_id: 9f46c5b7c07f1495e0f4bf8d6f72a525
|
device_id: 9f46c5b7c07f1495e0f4bf8d6f72a525
|
||||||
no_motion_wait: 0
|
no_motion_wait: 0
|
||||||
|
dont_disturb: false
|
||||||
|
- id: '1738426726761'
|
||||||
|
alias: Test-Pulsante01
|
||||||
|
description: ''
|
||||||
|
use_blueprint:
|
||||||
|
path: homeassistant/button_action.yaml
|
||||||
|
input:
|
||||||
|
light_target:
|
||||||
|
entity_id: light.test_lamp1
|
||||||
|
- id: '1738428672069'
|
||||||
|
alias: Test-EVcharge-process
|
||||||
|
description: ''
|
||||||
|
use_blueprint:
|
||||||
|
path: homeassistant/evcharge-process.yaml
|
||||||
|
input:
|
||||||
|
evcharge_entity1: switch.evcharge_front
|
||||||
|
evcharge_entity2: switch.evcharge_back
|
||||||
|
use_entity1: input_boolean.evcharge_front_request
|
||||||
|
use_entity2: input_boolean.evcharge_back_request
|
||||||
|
start_button: input_button.evcharge_start
|
||||||
|
|||||||
@@ -12,17 +12,18 @@ blueprint:
|
|||||||
entity:
|
entity:
|
||||||
domain: light
|
domain: light
|
||||||
|
|
||||||
# trigger_variables:
|
|
||||||
# use_sun: !input sun_condition
|
|
||||||
|
|
||||||
triggers:
|
triggers:
|
||||||
- trigger: time
|
- trigger: time
|
||||||
at: input_datetime.dont_disturb_nighttime_to
|
at: input_datetime.dont_disturb_nighttime_from
|
||||||
id: p1-confort-light-off
|
id: p1-confort-light-off
|
||||||
- trigger: sun
|
- trigger: sun
|
||||||
event: sunset
|
event: sunset
|
||||||
offset: 00:30:00
|
offset: 00:30:00
|
||||||
id: p1-confort-light-on
|
id: p1-confort-light-on
|
||||||
|
- trigger: state
|
||||||
|
entity_id:
|
||||||
|
- input_button.test_start_animation
|
||||||
|
id: test_animation
|
||||||
|
|
||||||
conditions: []
|
conditions: []
|
||||||
|
|
||||||
@@ -32,25 +33,25 @@ actions:
|
|||||||
- condition: trigger
|
- condition: trigger
|
||||||
id:
|
id:
|
||||||
- p1-confort-light-on
|
- p1-confort-light-on
|
||||||
|
- test_animation
|
||||||
sequence:
|
sequence:
|
||||||
- if:
|
- if:
|
||||||
- condition: template
|
- condition: template
|
||||||
# value_template: "{{ use_dont_disturb }}"
|
value_template: "{{ is_state('binary_sensor.dont_disturb_nighttime', 'on') }}"
|
||||||
value_template: "{{ dont_disturb_nighttime }}"
|
|
||||||
then:
|
then:
|
||||||
- action: light.turn_on
|
- action: light.turn_on
|
||||||
target: !input light_target
|
target: !input light_target
|
||||||
data:
|
data:
|
||||||
brightness_pct: states('dont_disturb_light_brightness')
|
brightness_pct: "{{ states('input_number.dont_disturb_light_brightness') | float }} "
|
||||||
color_temp: 523
|
# color_temp: "{{ states('input_number.confort_light_color') | float }}"
|
||||||
# color_temp_kelvin: 2700
|
color_temp_kelvin: "{{ states('input_number.confort_light_kelvin') }}"
|
||||||
else:
|
else:
|
||||||
- action: light.turn_on
|
- action: light.turn_on
|
||||||
target: !input light_target
|
target: !input light_target
|
||||||
data:
|
data:
|
||||||
brightness_pct: 100
|
brightness_pct: 100
|
||||||
color_temp: 523
|
# color_temp: "{{ states('input_number.confort_light_color') | float }}"
|
||||||
# color_temp_kelvin: 2700
|
color_temp_kelvin: "{{ states('input_number.confort_light_kelvin') }}"
|
||||||
|
|
||||||
- conditions:
|
- conditions:
|
||||||
- condition: trigger
|
- condition: trigger
|
||||||
|
|||||||
141
blueprints/automation/homeassistant/evcharge-process.yaml
Normal file
141
blueprints/automation/homeassistant/evcharge-process.yaml
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
blueprint:
|
||||||
|
name: evcharge_process
|
||||||
|
description: Mange charging process between two charging points
|
||||||
|
domain: automation
|
||||||
|
author: Tiziano Trabattoni
|
||||||
|
input:
|
||||||
|
evcharge_entity1:
|
||||||
|
name: Charge via 'Controlled Plug1'
|
||||||
|
description: Identifies the Switch1 (eg EVcharge-front)
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
filter:
|
||||||
|
- domain: switch
|
||||||
|
|
||||||
|
evcharge_entity2:
|
||||||
|
name: Charge via 'Controlled Plug2'
|
||||||
|
description: Identifies the Switch2 (eg EVcharge-back)
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
filter:
|
||||||
|
- domain: switch
|
||||||
|
use_entity1:
|
||||||
|
name: Enable charge via 'Controlled Plug1'
|
||||||
|
description: Identifies the input flag for charging on 'Controlled Plug1' (eg EVcharge_front_request)
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
filter:
|
||||||
|
- domain: input_boolean
|
||||||
|
use_entity2:
|
||||||
|
name: Enable charge via 'Controlled Plug2'
|
||||||
|
description: Identifies the input flag for charging on 'Controlled Plug2' (eg EVcharge_back_request)
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
filter:
|
||||||
|
- domain: input_boolean
|
||||||
|
|
||||||
|
start_button:
|
||||||
|
name: start_button
|
||||||
|
description: Identifies the button to start EVcharge process
|
||||||
|
selector:
|
||||||
|
entity:
|
||||||
|
filter:
|
||||||
|
- domain: input_button
|
||||||
|
|
||||||
|
triggers:
|
||||||
|
- trigger: state # Want to trigger start now
|
||||||
|
entity_id: !input start_button
|
||||||
|
id: start_now
|
||||||
|
- trigger: time # Start at F3 start tome
|
||||||
|
at: input_datetime.evcharge_good_time_start
|
||||||
|
id: start_at_good_time
|
||||||
|
|
||||||
|
# for time being let's do sequential charge for Plug1 and then Plug2
|
||||||
|
mode: single
|
||||||
|
|
||||||
|
# here we could stop immediately if sensor.pw_load_power is above 5000W but lets decide after
|
||||||
|
conditions: []
|
||||||
|
|
||||||
|
variables:
|
||||||
|
evcharge_entity1_var: !input evcharge_entity1
|
||||||
|
evcharge_entity2_var: !input evcharge_entity2
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- action: notify.mobile_app_ttrabatt_iphone15
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
message: >-
|
||||||
|
"EVcharge process on {{ evcharge_entity1_var }} has started"
|
||||||
|
title: EV Charge process
|
||||||
|
|
||||||
|
# switch of all plugs
|
||||||
|
- action: switch.turn_off
|
||||||
|
# entity_id: !input evcharge_entity1
|
||||||
|
entity_id: switch.presa_smart_1
|
||||||
|
- delay: 10
|
||||||
|
- action: switch.turn_off
|
||||||
|
# entity_id: !input evcharge_entity2
|
||||||
|
entity_id: switch.presa_smart_2
|
||||||
|
|
||||||
|
# Start plug1 and wait until power measured is below input_number.evcharge_no_charge_threshold for 10 minutes = 600 seconds
|
||||||
|
- action: switch.turn_on
|
||||||
|
# entity_id: !input evcharge_entity1
|
||||||
|
entity_id: switch.presa_smart_1
|
||||||
|
|
||||||
|
# need to wait car to start charging
|
||||||
|
#- delay: 60
|
||||||
|
- delay: 10
|
||||||
|
|
||||||
|
- repeat:
|
||||||
|
# until: "{{ state_attr( evcharge_entity1_var, 'power') < states('input_number.evcharge_no_charge_threshold') }}"
|
||||||
|
until: "{{ state_attr('sensor.evcharge_front', 'power') < states('input_number.evcharge_no_charge_threshold') }}"
|
||||||
|
sequence:
|
||||||
|
- delay: 60
|
||||||
|
|
||||||
|
- action: switch.turn_off
|
||||||
|
# entity_id: !input evcharge_entity1
|
||||||
|
entity_id: switch.presa_smart_1
|
||||||
|
|
||||||
|
- action: notify.mobile_app_ttrabatt_iphone15
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
message: >-
|
||||||
|
"EVcharge process on {{ evcharge_entity1_var }} has ended"
|
||||||
|
title: EV Charge process
|
||||||
|
|
||||||
|
# wait couple of minutes before starting charge on plug2
|
||||||
|
#- delay: 120
|
||||||
|
- delay: 10
|
||||||
|
|
||||||
|
# then start plug2 and wait until power measured is below input_number.evcharge_no_charge_threshold for 10 minutes = 600 seconds
|
||||||
|
- action: notify.mobile_app_ttrabatt_iphone15
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
message: >-
|
||||||
|
"EVcharge process on {{ evcharge_entity2_var }} has started"
|
||||||
|
title: EV Charge process
|
||||||
|
|
||||||
|
- action: switch.turn_on
|
||||||
|
# entity_id: !input evcharge_entity1
|
||||||
|
entity_id: switch.presa_smart_2
|
||||||
|
|
||||||
|
# need to wait car to start charging
|
||||||
|
#- delay: 60
|
||||||
|
- delay: 10
|
||||||
|
|
||||||
|
- repeat:
|
||||||
|
# until: "{{ state_attr( evcharge_entity2_var, 'power') < states('input_number.evcharge_no_charge_threshold') }}"
|
||||||
|
until: "{{ state_attr('sensor.evcharge_back', 'power') < states('input_number.evcharge_no_charge_threshold') }}"
|
||||||
|
sequence:
|
||||||
|
- delay: 60
|
||||||
|
|
||||||
|
- action: switch.turn_off
|
||||||
|
# entity_id: !input evcharge_entity2
|
||||||
|
entity_id: switch.presa_smart_2
|
||||||
|
|
||||||
|
- action: notify.mobile_app_ttrabatt_iphone15
|
||||||
|
metadata: {}
|
||||||
|
data:
|
||||||
|
message: >-
|
||||||
|
"EVcharge process on {{ evcharge_entity2_var }} has ended"
|
||||||
|
title: EV Charge process
|
||||||
Reference in New Issue
Block a user