183 lines
5.4 KiB
YAML
183 lines
5.4 KiB
YAML
- alias: 'Solar control: Change EV charging ampere'
|
|
id: solar_control_adjust_ev_charging
|
|
description: This automation changes the EV charging rate based on current solar
|
|
production.
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.solar_control_ev_charging
|
|
- trigger: state
|
|
entity_id:
|
|
- input_boolean.solar_control_auto_adjust_charging
|
|
from: 'off'
|
|
to: 'on'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.solar_control_auto_adjust_charging
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: sensor.easee_status
|
|
state: charging
|
|
actions:
|
|
- action: easee.set_circuit_dynamic_limit
|
|
data_template:
|
|
device_id: xxxxxxxxxxxxxxxxxxxxxxxx
|
|
current_p1: '{{ states.sensor.solar_control_ev_charging.attributes.phases.P1
|
|
}}'
|
|
current_p2: '{{ states.sensor.solar_control_ev_charging.attributes.phases.P2
|
|
}}'
|
|
current_p3: '{{ states.sensor.solar_control_ev_charging.attributes.phases.P3
|
|
}}'
|
|
- delay:
|
|
hours: 0
|
|
minutes: 1
|
|
seconds: 0
|
|
milliseconds: 0
|
|
mode: single
|
|
max_exceeded: silent
|
|
- alias: 'Solar control: Disable solar selling'
|
|
id: solar_control_disable_solar_selling
|
|
description: This automation disables export to grid if current sales prices are
|
|
below a defined threshold
|
|
triggers:
|
|
- trigger: numeric_state
|
|
entity_id:
|
|
- sensor.eksportpriser
|
|
below: input_number.solar_control_solar_selling_cutoff
|
|
- trigger: state
|
|
entity_id:
|
|
- input_boolean.solar_control_optimize_solar_selling
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.solar_control_optimize_solar_selling
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.eksportpriser
|
|
below: input_number.solar_control_solar_selling_cutoff
|
|
actions:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.deyemodbus_deye_solar_sell
|
|
mode: single
|
|
max_exceeded: silent
|
|
- alias: 'Solar control: Enable solar selling'
|
|
id: solar_control_enable_solar_selling
|
|
description: This automation enables export to grid if current sales prices are
|
|
above a defined threshold
|
|
triggers:
|
|
- trigger: numeric_state
|
|
entity_id:
|
|
- sensor.eksportpriser
|
|
above: input_number.solar_control_solar_selling_cutoff
|
|
- trigger: state
|
|
entity_id:
|
|
- input_boolean.solar_control_optimize_solar_selling
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.solar_control_optimize_solar_selling
|
|
state: 'on'
|
|
- condition: numeric_state
|
|
entity_id: sensor.eksportpriser
|
|
above: input_number.solar_control_solar_selling_cutoff
|
|
actions:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.deyemodbus_deye_solar_sell
|
|
mode: single
|
|
max_exceeded: silent
|
|
- alias: 'Solar control: Change grid charging finish time'
|
|
id: solar_control_change_grid_charging_finish
|
|
description: Change finish time for grid charging
|
|
triggers:
|
|
- trigger: time
|
|
at: 07:00:30
|
|
id: kl7
|
|
- trigger: time
|
|
at: '17:00:30'
|
|
id: kl17
|
|
conditions: []
|
|
actions:
|
|
- if:
|
|
- condition: trigger
|
|
id:
|
|
- kl7
|
|
then:
|
|
- action: select.select_option
|
|
metadata: {}
|
|
data:
|
|
option: '17:00'
|
|
target:
|
|
entity_id: select.ev_smart_charging_house_charge_completion_time
|
|
else:
|
|
- action: select.select_option
|
|
metadata: {}
|
|
data:
|
|
option: 07:00
|
|
target:
|
|
entity_id: select.ev_smart_charging_house_charge_completion_time
|
|
mode: single
|
|
- alias: 'Solar control: Start grid charging'
|
|
id: solar_control_start_grid_charging
|
|
description: Enable grid charging based on EV Smart Charging status
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.ev_smart_charging_house_charging
|
|
to: 'on'
|
|
from: 'off'
|
|
conditions: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: time
|
|
before: 05:54:00
|
|
sequence:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.deyemodbus_deye_time_point_1_charge_enable
|
|
- action: number.set_value
|
|
target:
|
|
entity_id: number.deyemodbus_deye_time_point_1_capacity
|
|
data:
|
|
value: '{{states(''input_number.solar_control_house_battery_target_soc_midnight'')|int}}'
|
|
- conditions:
|
|
- condition: time
|
|
after: 05:59:00
|
|
sequence:
|
|
- action: switch.turn_on
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id: switch.deyemodbus_deye_time_point_4_charge_enable
|
|
- action: number.set_value
|
|
target:
|
|
entity_id: number.deyemodbus_deye_time_point_4_capacity
|
|
data:
|
|
value: '{{states(''input_number.solar_control_house_battery_target_soc_before_peak'')|int}}'
|
|
mode: single
|
|
- alias: 'Solar control: Stop grid charging'
|
|
id: solar_control_stop_grid_charging
|
|
description: Disable grid charging based on EV Smart Charging status
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.ev_smart_charging_house_charging
|
|
to: 'off'
|
|
from: 'on'
|
|
conditions: []
|
|
actions:
|
|
- action: switch.turn_off
|
|
metadata: {}
|
|
data: {}
|
|
target:
|
|
entity_id:
|
|
- switch.deyemodbus_deye_time_point_1_charge_enable
|
|
- switch.deyemodbus_deye_time_point_2_charge_enable
|
|
- switch.deyemodbus_deye_time_point_3_charge_enable
|
|
- switch.deyemodbus_deye_time_point_4_charge_enable
|
|
- switch.deyemodbus_deye_time_point_5_charge_enable
|
|
- switch.deyemodbus_deye_time_point_6_charge_enable
|
|
mode: single
|