BrowningC
(Christopher)
September 5, 2024, 9:09am
676
Thank you.
Please could you show the next bit - what comes after
entity_id: number.solaredge_i1_storage_discharge_limit
ie what are the variables?
Also some of the entities in my pre-installed YAMLs are of the form d17eca2b9c67371873384b590b0b17f1
rather than number.solaredge_i1_storage_discharge_limit
How are these translated?
P6Dave
(Dave Forrester)
September 5, 2024, 2:57pm
677
That looks more like a device_id
than an entity_id
number.solaredge_i1_storage_discharge_limit
is an entity_id
.
Here’s the complete automation. Bear in mind that I’ve created some input_boolean
and some input_number
helpers as well as a timer to limit the overall charge period to 4 hours at any single charge window . I’ve also created an option to cope with the daily inverter reset that can happen during a charge window.
alias: Rolec EV Chargepoint schedule
description: Multiple Slots for Agile
trigger:
- platform: state
entity_id:
- >-
binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
from: "off"
to: "on"
id: "On"
enabled: true
- platform: state
entity_id:
- >-
binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
from: "on"
to: "off"
id: "Off"
enabled: true
- platform: state
entity_id:
- switch.shelly1_c45bbe7867c7
from: unavailable
id: Rolec Available
- alias: Rolec 4 Hour charge completed
platform: event
event_type: timer.finished
event_data:
entity_id: timer.rolec_4_hour_charge_period
id: Stop Charge
- platform: time
at: "20:59:00"
id: Activate Charge Session
- alias: When inverter resets
platform: state
entity_id:
- switch.solaredge_i1_advanced_power_control
from: unavailable
to: "on"
id: Inverter Reset
for:
hours: 0
minutes: 1
seconds: 0
- platform: numeric_state
entity_id:
- sensor.shellyem_244cab4194b1_channel_2_power
below: 20
id: Charge Complete
- platform: state
entity_id:
- binary_sensor.morning
to: "on"
id: Reset Timer
condition: []
action:
- choose:
- conditions:
- condition: trigger
id:
- Activate Charge Session
sequence:
- condition: state
entity_id: input_boolean.rolec_battery_master
state: "off"
- condition: state
entity_id: input_boolean.car_plugged_in
state: "on"
- data: {}
target:
entity_id: input_boolean.rolec_battery_master
action: input_boolean.turn_on
- conditions:
- condition: trigger
id:
- "On"
- condition: state
entity_id: input_boolean.rolec_battery_master
state: "on"
- condition: state
entity_id: input_boolean.car_plugged_in
state: "on"
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_on
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- data:
value: >-
{{
states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
| float(0) }}
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- data: {}
target:
entity_id: timer.rolec_4_hour_charge_period
action: timer.start
- conditions:
- condition: trigger
id:
- "Off"
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_off
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- data:
value: >-
{{ states('input_number.default_battery_output_limit') |
float(0) }}
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- data: {}
target:
entity_id: timer.rolec_4_hour_charge_period
action: timer.pause
- conditions:
- condition: trigger
id: Rolec Available
- condition: state
entity_id: >-
binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
state: "on"
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: "off"
- condition: state
entity_id: input_boolean.rolec_battery_master
state: "on"
- condition: state
entity_id: input_boolean.car_plugged_in
state: "on"
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_on
- data:
message: >-
The Rolec was turned on because it became available during a
charge period.
title: ROLEC ON
action: script.text_notify_dave
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- data:
value: >-
{{
states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
| float(0) }}
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id: Rolec Available
- condition: state
entity_id: >-
binary_sensor.octopus_energy_target_intermittent_best_rates_total_4_hours
state: "off"
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: "on"
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_off
- data:
message: >-
The Rolec was turned off because it was on outside of a charge
period.
title: ROLEC OFF
action: script.text_notify_dave
- conditions:
- condition: trigger
id:
- Stop Charge
- Charge Complete
sequence:
- data: {}
target:
entity_id: switch.shelly1_c45bbe7867c7
action: switch.turn_off
- delay:
hours: 0
minutes: 0
seconds: 30
milliseconds: 0
- data:
value: >-
{{ states('input_number.default_battery_output_limit') |
float(0) }}
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- action: script.car_plugged_in
data: {}
- conditions:
- condition: trigger
id:
- Inverter Reset
- condition: numeric_state
entity_id: number.solaredge_i1_storage_discharge_limit
above: 100
- condition: state
entity_id: switch.shelly1_c45bbe7867c7
state: "on"
- condition: state
entity_id: timer.rolec_4_hour_charge_period
state: active
- condition: state
entity_id: input_boolean.car_plugged_in
state: "on"
sequence:
- data:
value: >-
{{
states('input_number.desired_battery_output_limit_for_overnight_ev_charging')
| float(0) }}
target:
entity_id: number.solaredge_i1_storage_discharge_limit
action: number.set_value
- conditions:
- condition: trigger
id:
- Reset Timer
sequence:
- wait_for_trigger:
- platform: state
entity_id:
- switch.shelly1_c45bbe7867c7
from: "on"
to: "off"
for:
hours: 0
minutes: 1
seconds: 0
timeout:
hours: 1
minutes: 0
seconds: 0
milliseconds: 0
- target:
entity_id: timer.rolec_4_hour_charge_period
data: {}
action: timer.cancel
mode: single