955 lines
31 KiB
YAML
955 lines
31 KiB
YAML
- id: dhw_e_price_negative_auto
|
|
alias: DHW e-price negative auto
|
|
description: Set DHW booster on when E-price is negative
|
|
mode: single
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: sensor.nord_pool_nl_current_prices_including_tax
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.nord_pool_nl_current_prices_including_tax'')
|
|
| float(0) ) < 0 }}'
|
|
actions:
|
|
- action: switch.turn_on
|
|
entity_id: switch.dhw_booster_2_switch
|
|
- id: dhw_e_price_positive_auto
|
|
alias: DHW e-price negative auto
|
|
description: Set DHW booster on when E-price is negative
|
|
mode: single
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /5
|
|
- trigger: state
|
|
entity_id: sensor.nord_pool_nl_current_prices_including_tax
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.nord_pool_nl_current_prices_including_tax'')
|
|
| float(0) ) >= 0 }}'
|
|
actions:
|
|
- action: switch.turn_off
|
|
entity_id: switch.dhw_booster_2_switch
|
|
- id: dhw_circulation_on_auto
|
|
alias: DHW circulation on auto
|
|
description: Set the DHW circulation state to on
|
|
mode: restart
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
to: 'on'
|
|
for:
|
|
minutes: 10
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_state
|
|
to: 'on'
|
|
for:
|
|
minutes: 20
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_2_state_s1
|
|
to: 'on'
|
|
for:
|
|
minutes: 20
|
|
conditions:
|
|
and:
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
state: 'off'
|
|
- or:
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_state
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_2_state_s1
|
|
state: 'on'
|
|
actions:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.dhw_circulation_switch
|
|
- id: dhw_circulation_off_auto
|
|
alias: dhw_circulation_off_auto
|
|
description: Set the DHW circulation state to off
|
|
mode: restart
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /5
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_state
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_2_state_s1
|
|
conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_state
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_booster_2_state_s1
|
|
state: 'off'
|
|
actions:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.dhw_circulation_switch
|
|
- id: goodwe_e_price_negative_auto
|
|
alias: Goodwe e-price negative auto
|
|
description: Set inverter grid_limit to 0% when E-price is negative, E-price from
|
|
ENTSO-e corrected to incl tax
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: time_pattern
|
|
seconds: /21
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: above_horizon
|
|
- condition: template
|
|
value_template: '{{ has_value(''sensor.goodwe_export_power_limit'') }}'
|
|
- condition: template
|
|
value_template: '{{ not is_state(''input_select.goodwe_export_strategy_select'',
|
|
state_attr(''input_select.goodwe_export_strategy_select'', ''options'')[ 0 ]
|
|
) }}'
|
|
actions:
|
|
- variables:
|
|
rated_power: 8000
|
|
update_ratio: 0.8
|
|
zero_on_meter: '{{ max(min( (states(''input_number.goodwe_grid_export_limit'')
|
|
| float(0)) + update_ratio*100/rated_power*(states(''sensor.p1_meter_active_power_filtered'')
|
|
| float(0)) ,100),0) }}'
|
|
balanced_max: '{{ max(min( 100.0 - 100.0*(states(''sensor.nord_pool_nl_current_price'')
|
|
| float(0) | abs) / ((states(''sensor.nord_pool_nl_current_prices_including_tax'')
|
|
| float(0) | abs) + (states(''sensor.nord_pool_nl_current_price'') | float(0)
|
|
| abs)) ,100),0) }}'
|
|
- choose:
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.nord_pool_nl_current_prices_including_tax
|
|
below: -0.001
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.goodwe_grid_export_limit
|
|
data:
|
|
value: 0.0
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_select.goodwe_export_strategy_select'',
|
|
state_attr(''input_select.goodwe_export_strategy_select'', ''options'')[
|
|
1 ] ) }}'
|
|
- condition: numeric_state
|
|
entity_id: sensor.nord_pool_nl_current_price
|
|
below: -0.001
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.goodwe_grid_export_limit
|
|
data:
|
|
value: 100
|
|
- conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_select.goodwe_export_strategy_select'',
|
|
state_attr(''input_select.goodwe_export_strategy_select'', ''options'')[
|
|
2 ] ) }}'
|
|
- condition: numeric_state
|
|
entity_id: sensor.nord_pool_nl_current_price
|
|
below: -0.001
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.goodwe_grid_export_limit
|
|
data:
|
|
value: '{{ max(balanced_max,zero_on_meter) | round(1) }}'
|
|
- conditions:
|
|
- condition: or
|
|
conditions:
|
|
- condition: and
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_select.goodwe_export_strategy_select'',
|
|
state_attr(''input_select.goodwe_export_strategy_select'', ''options'')[
|
|
3 ] ) }}'
|
|
- condition: numeric_state
|
|
entity_id: sensor.nord_pool_nl_current_price
|
|
below: -0.001
|
|
- condition: template
|
|
value_template: '{{ is_state(''input_select.goodwe_export_strategy_select'',
|
|
state_attr(''input_select.goodwe_export_strategy_select'', ''options'')[
|
|
4 ] ) }}'
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.goodwe_grid_export_limit
|
|
data:
|
|
value: '{{ zero_on_meter | round(1) }}'
|
|
default:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.goodwe_grid_export_limit
|
|
data:
|
|
value: 100
|
|
- id: goodwe_update_grid_export_limit_auto
|
|
alias: Goodwe update grid export limit auto
|
|
description: Synchronizes the Goodwe grid export limit input number and modbus state
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- input_number.goodwe_grid_export_limit
|
|
id: grid_export_limit_number_trig
|
|
- trigger: template
|
|
value_template: '{{ (states(''sensor.goodwe_export_power_limit'') | float(0) -
|
|
states(''input_number.goodwe_grid_export_limit'') | float(0)) | abs > 1 }}'
|
|
for: 00:15:00
|
|
id: grid_export_limit_catch_trig
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: above_horizon
|
|
- condition: template
|
|
value_template: '{{ has_value(''sensor.goodwe_export_power_limit'') }}'
|
|
actions:
|
|
- variables:
|
|
input_value: '{{ states("input_number.goodwe_grid_export_limit") | round(0)
|
|
}}'
|
|
- action: modbus.write_register
|
|
data_template:
|
|
address: 292
|
|
slave: 1
|
|
hub: modbus_gateway_goodwe
|
|
value: '{{ [ min(max( input_value | round(0) ,0),100) ] }}'
|
|
- id: goodwe_scan_modbus_auto
|
|
alias: Goodwe scan modbus auto
|
|
description: Polls all sensor entities for modbus_gateway_goodwe
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: time_pattern
|
|
seconds: /20
|
|
- trigger: homeassistant
|
|
event: start
|
|
conditions:
|
|
- condition: state
|
|
entity_id: sun.sun
|
|
state: above_horizon
|
|
actions:
|
|
- variables:
|
|
goodwe_list: '{{ states.sensor | selectattr(''entity_id'', ''search'', ''sensor.goodwe_'')
|
|
| list | map(attribute=''entity_id'') | list }}'
|
|
other_list:
|
|
- sensor.today_s_pv_generation
|
|
- sensor.total_pv_generation
|
|
- action: homeassistant.update_entity
|
|
target:
|
|
entity_id: '{{goodwe_list+other_list}}'
|
|
- id: heatmeisters_on_at_startup_auto
|
|
alias: Heatmeisters ON at Startup auto
|
|
description: Turns on the heatmeisters for some minutes after start-up
|
|
mode: restart
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_compressor_state
|
|
from: 'off'
|
|
to: 'on'
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
from: 'on'
|
|
to: 'off'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
state: 'off'
|
|
actions:
|
|
- sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_master_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_master_bedroom_fan_speed'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_chris_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_chris_bedroom_fan_speed'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_julia_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_julia_bedroom_fan_speed'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_computer_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_computer_room_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_master_bedroom_fan_speed
|
|
below: input_number.heatmeisters_start_up_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_master_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_start_up_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_chris_bedroom_fan_speed
|
|
below: input_number.heatmeisters_start_up_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_chris_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_start_up_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_julia_bedroom_fan_speed
|
|
below: input_number.heatmeisters_start_up_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_julia_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_start_up_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_computer_room_fan_speed
|
|
below: input_number.heatmeisters_start_up_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_computer_room_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_start_up_fan_speed'') }}'
|
|
- delay:
|
|
minutes: 15
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_master_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_master_fan_state'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_chris_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_chris_fan_state'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_julia_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_julia_fan_state'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_computer_room_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_computer_fan_state'') }}'
|
|
- id: heatmeisters_on_when_cooling_auto
|
|
alias: Heatmeisters ON when cooling auto
|
|
description: Turns ON the heatmeisters when cooling
|
|
mode: restart
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_compressor_state
|
|
from: 'off'
|
|
to: 'on'
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
from: 'on'
|
|
to: 'off'
|
|
- trigger: numeric_state
|
|
entity_id: automation.heatmeisters_on_at_startup_auto
|
|
attribute: current
|
|
below: 1
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: '{{ is_state_attr(''climate.therma_v_heating_cooling'', ''hvac_modes'',
|
|
''cool'') }}'
|
|
- condition: numeric_state
|
|
entity_id: automation.heatmeisters_on_at_startup_auto
|
|
attribute: current
|
|
below: 1
|
|
actions:
|
|
- sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_master_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_master_bedroom_fan_speed'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_chris_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_chris_bedroom_fan_speed'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_julia_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_julia_bedroom_fan_speed'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatmeisters_computer_fan_state
|
|
data:
|
|
value: '{{ states(''input_number.heatbooster_computer_room_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_master_bedroom_fan_speed
|
|
below: input_number.heatmeisters_cooling_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_master_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_cooling_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_chris_bedroom_fan_speed
|
|
below: input_number.heatmeisters_cooling_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_chris_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_cooling_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_julia_bedroom_fan_speed
|
|
below: input_number.heatmeisters_cooling_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_julia_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_cooling_fan_speed'') }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: input_number.heatbooster_computer_room_fan_speed
|
|
below: input_number.heatmeisters_cooling_fan_speed
|
|
sequence:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_computer_room_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_cooling_fan_speed'') }}'
|
|
- id: heatmeisters_off_when_cooling_stops_auto
|
|
alias: Heatmeisters OFF when cooling stops auto
|
|
description: Turns OFF the heatmeisters when cooling stops
|
|
mode: restart
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_compressor_state
|
|
from: 'on'
|
|
to: 'off'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
state: 'off'
|
|
- condition: template
|
|
value_template: '{{ is_state_attr(''climate.therma_v_heating_cooling'', ''hvac_modes'',
|
|
''cool'') }}'
|
|
actions:
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_master_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_master_fan_state'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_chris_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_chris_fan_state'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_julia_bedroom_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_julia_fan_state'') }}'
|
|
- action: input_number.set_value
|
|
target:
|
|
entity_id: input_number.heatbooster_computer_room_fan_speed
|
|
data:
|
|
value: '{{ states(''input_number.heatmeisters_computer_fan_state'') }}'
|
|
- id: holiday_mode_lights_on_auto
|
|
alias: Holiday mode lights on auto
|
|
description: Turns on the lights automatically when on holiday
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: time
|
|
at: input_datetime.lights_on_time
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.holiday_mode_on
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_on
|
|
target:
|
|
entity_id: light.ikea_of_sweden_tradfri_bulb_e27_ww_g95_cl_470lm_light
|
|
data:
|
|
brightness: 254
|
|
- id: holiday_mode_lights_off_auto
|
|
alias: Holiday mode lights off auto
|
|
description: Turns off the lights automatically when on holiday
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: time
|
|
at: input_datetime.lights_off_time
|
|
conditions:
|
|
- condition: state
|
|
entity_id: input_boolean.holiday_mode_on
|
|
state: 'on'
|
|
actions:
|
|
- action: light.turn_off
|
|
target:
|
|
entity_id: light.ikea_of_sweden_tradfri_bulb_e27_ww_g95_cl_470lm_light
|
|
- id: cooling_off_based_on_dewpoint_auto
|
|
alias: Cooling off based on dewpoint auto
|
|
description: Switch off cooling if livingroom dewpoint is above return temperatures
|
|
mode: restart
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.shelly_plus_ht1_dewpoint
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.openweathermap_dewpoint
|
|
conditions:
|
|
- condition: state
|
|
entity_id: climate.therma_v_heating_cooling
|
|
state: cool
|
|
- condition: template
|
|
value_template: '{{ ( states(''sensor.shelly_plus_ht1_dewpoint'') | float(0) )
|
|
> (states(''sensor.therma_v_buffer_temperatures_return_from_heating_t3'') |
|
|
float(0) ) }}'
|
|
- condition: template
|
|
value_template: '{{ ( states(''sensor.shelly_plus_ht1_dewpoint'') | float(0) )
|
|
> (states(''sensor.therma_v_buffer_temperatures_return_to_heatpump_t4'') | float(0)
|
|
) }}'
|
|
actions:
|
|
- action: switch.turn_off
|
|
entity_id: switch.therma_v_silent_mode
|
|
- action: switch.turn_off
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
- id: ess_based_on_e_price_negative_auto
|
|
alias: ESS based on e-price negative auto
|
|
description: Set the ESS state of the Therma V based on negative e-price
|
|
mode: restart
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /30
|
|
- trigger: state
|
|
entity_id: sensor.nord_pool_nl_current_prices_including_tax
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.nord_pool_nl_current_prices_including_tax'')
|
|
| float(0) ) <= 0 }}'
|
|
actions:
|
|
- delay:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.therma_v_dhw_on_off
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.silent_mode_startup
|
|
- choose:
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.current_percentage_of_energy_price
|
|
below: 5
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.nord_pool_nl_next_price'') | float(0)
|
|
) >= (states(''sensor.nord_pool_nl_current_price'') | float(0) ) }}'
|
|
sequence:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 5
|
|
] }}'
|
|
default:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 6 ]
|
|
}}'
|
|
- id: ess_based_on_e_price_positive_normal_auto
|
|
alias: ESS based on e-price positive normal auto
|
|
description: Set the ESS state of the Therma V based on positive e-price low price
|
|
difference
|
|
mode: restart
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /30
|
|
- trigger: state
|
|
entity_id: sensor.nord_pool_nl_current_prices_including_tax
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.nord_pool_nl_current_prices_including_tax'')
|
|
| float(0) ) > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.difference_in_electricity_price_today'')
|
|
| float(0) ) < (states(''input_number.therma_v_ess_high_price_difference'')
|
|
| float(0)) }}'
|
|
actions:
|
|
- delay:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
- choose:
|
|
- conditions:
|
|
- or:
|
|
- condition: numeric_state
|
|
entity_id: sensor.current_percentage_of_energy_price
|
|
below: 50
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
state: 'on'
|
|
sequence:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 2
|
|
] }}'
|
|
default:
|
|
sequence:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 7
|
|
] }}'
|
|
- id: ess_based_on_e_price_positive_high_auto
|
|
alias: ESS based on e-price positive high auto
|
|
description: Set the ESS state of the Therma V based on positive e-price high price
|
|
difference
|
|
mode: restart
|
|
triggers:
|
|
- trigger: time_pattern
|
|
minutes: /30
|
|
- trigger: state
|
|
entity_id: sensor.nord_pool_nl_current_prices_including_tax
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
conditions:
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.nord_pool_nl_current_prices_including_tax'')
|
|
| float(0) ) > 0 }}'
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.difference_in_electricity_price_today'')
|
|
| float(0) ) >= (states(''input_number.therma_v_ess_high_price_difference'')
|
|
| float(0)) }}'
|
|
actions:
|
|
- delay:
|
|
hours: 0
|
|
minutes: 5
|
|
seconds: 0
|
|
- choose:
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.current_percentage_of_energy_price
|
|
below: 5
|
|
- condition: template
|
|
value_template: '{{ (states(''sensor.nord_pool_nl_next_price'') | float(0)
|
|
) >= (states(''sensor.nord_pool_nl_current_price'') | float(0) ) }}'
|
|
sequence:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 6
|
|
] }}'
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_dhw_heating_state
|
|
state: 'on'
|
|
sequence:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 2
|
|
] }}'
|
|
- conditions:
|
|
- condition: numeric_state
|
|
entity_id: sensor.current_percentage_of_energy_price
|
|
above: 50
|
|
sequence:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 8
|
|
] }}'
|
|
default:
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ 7 ]
|
|
}}'
|
|
- id: therma_v_update_energy_saving_state_auto
|
|
alias: Therma V Update Energy Saving State auto
|
|
description: Synchronizes the Therma V ESS input select and modbus state
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id:
|
|
- sensor.therma_v_energy_state
|
|
id: ess_modbus_trig
|
|
- trigger: state
|
|
entity_id:
|
|
- input_select.therma_v_ess_select
|
|
id: ess_select_trig
|
|
- trigger: homeassistant
|
|
event: start
|
|
id: ess_ha_start_trig
|
|
conditions: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: trigger
|
|
id: ess_modbus_trig
|
|
sequence:
|
|
- variables:
|
|
index: '{{ trigger.to_state.state | int(0) }}'
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ index
|
|
] }}'
|
|
- conditions:
|
|
- condition: trigger
|
|
id: ess_select_trig
|
|
sequence:
|
|
- action: modbus.write_register
|
|
data_template:
|
|
address: 9
|
|
slave: 1
|
|
hub: modbus_gateway_therma_v
|
|
value: '{{ trigger.to_state.state[0] | int(0) }}'
|
|
default:
|
|
- variables:
|
|
index: '{{ states("sensor.therma_v_energy_state") | int(0) }}'
|
|
- action: input_select.select_option
|
|
target:
|
|
entity_id: input_select.therma_v_ess_select
|
|
data:
|
|
option: '{{ state_attr("input_select.therma_v_ess_select", "options")[ index
|
|
] }}'
|
|
- id: therma_v_silent_on_based_on_temp_time_auto
|
|
alias: Therma V Silent ON based on temperature and time auto
|
|
description: Turns on silent mode at set time and when the temperature is high enough
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: time
|
|
at: input_datetime.silent_start_time
|
|
- trigger: state
|
|
entity_id: sensor.therma_v_outside_temperature
|
|
conditions:
|
|
- and:
|
|
- condition: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
state: 'on'
|
|
- or:
|
|
- condition: time
|
|
after: input_datetime.silent_start_time
|
|
before: input_datetime.silent_stop_time
|
|
- condition: numeric_state
|
|
entity_id: sensor.therma_v_outside_temperature
|
|
above: 8
|
|
actions:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.silent_mode_state
|
|
- id: therma_v_silent_off_based_on_temp_time_auto
|
|
alias: Therma V Silent OFF based on temperature and time auto
|
|
description: Turns off silent mode when outside temp is too low respecting silent
|
|
time window
|
|
mode: single
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: time
|
|
at: input_datetime.silent_stop_time
|
|
- trigger: state
|
|
entity_id: sensor.therma_v_outside_temperature
|
|
conditions:
|
|
- and:
|
|
- condition: numeric_state
|
|
entity_id: automation.therma_v_silent_on_at_startup
|
|
attribute: current
|
|
below: 1
|
|
- condition: numeric_state
|
|
entity_id: sensor.therma_v_outside_temperature
|
|
below: 6
|
|
- condition: time
|
|
after: input_datetime.silent_stop_time
|
|
before: input_datetime.silent_start_time
|
|
actions:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.silent_mode_state
|
|
- id: therma_v_silent_on_at_startup_auto
|
|
alias: Therma V Silent ON at startup auto
|
|
description: Turns on silent mode for some minutes after start-up
|
|
mode: restart
|
|
max_exceeded: silent
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_compressor_state
|
|
from: 'off'
|
|
to: 'on'
|
|
- trigger: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
from: 'on'
|
|
to: 'off'
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
state: 'on'
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_defrost_state
|
|
state: 'off'
|
|
- condition: state
|
|
entity_id: input_boolean.silent_mode_startup
|
|
state: 'on'
|
|
actions:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.therma_v_silent_mode
|
|
- delay:
|
|
minutes: 15
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: switch.silent_mode_state
|
|
state: 'on'
|
|
sequence:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.therma_v_silent_mode
|
|
default:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.therma_v_silent_mode
|
|
- id: therma_v_silent_mode_off_auto
|
|
alias: Therma V Silent Mode OFF auto
|
|
description: Turns off silent mode when heating/cooling is switched off
|
|
mode: single
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
from: 'on'
|
|
to: 'off'
|
|
- trigger: time_pattern
|
|
minutes: /30
|
|
conditions:
|
|
- condition: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
state: 'off'
|
|
actions:
|
|
- action: switch.turn_off
|
|
target:
|
|
entity_id: switch.silent_mode_state
|
|
- action: input_boolean.turn_off
|
|
target:
|
|
entity_id: input_boolean.silent_mode_startup
|
|
- id: therma_v_silent_mode_on_auto
|
|
alias: Therma V Silent Mode ON auto
|
|
description: Turns on silent mode when heating/cooling is switched on
|
|
mode: single
|
|
triggers:
|
|
- trigger: state
|
|
entity_id: switch.therma_v_heating_cooling_on_off
|
|
from: 'off'
|
|
to: 'on'
|
|
conditions: []
|
|
actions:
|
|
- action: switch.turn_on
|
|
target:
|
|
entity_id: switch.silent_mode_state
|
|
- action: input_boolean.turn_on
|
|
target:
|
|
entity_id: input_boolean.silent_mode_startup
|
|
- id: therma_v_switch_on_ufh_pump_auto
|
|
alias: Therma V switch on ufh pump auto
|
|
description: Switch on underfloof heating pump when therma V external pump is active
|
|
mode: single
|
|
triggers:
|
|
- trigger: time_pattern
|
|
seconds: /10
|
|
conditions: []
|
|
actions:
|
|
- choose:
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_external_water_pump_state
|
|
state: 'on'
|
|
sequence:
|
|
- action: switch.turn_on
|
|
entity_id: switch.shelly_plug_s2
|
|
- conditions:
|
|
- condition: state
|
|
entity_id: binary_sensor.therma_v_external_water_pump_state
|
|
state: 'off'
|
|
sequence:
|
|
- action: switch.turn_off
|
|
entity_id: switch.shelly_plug_s2
|
|
- template:
|
|
- sensor:
|
|
- name: Unavailable Entities
|
|
unique_id: unavailable_entities
|
|
icon: '{{ iif(states(this.entity_id)|int(-1) > 0,''mdi:alert-circle'',''mdi:check-circle'')
|
|
}}'
|
|
state: '{% set entities = state_attr(this.entity_id,''entity_id'') %} {{ entities|count
|
|
if entities != none else none }}
|
|
|
|
'
|
|
state_class: measurement
|
|
attributes:
|
|
entity_id: "{% set ignore_seconds = 120 %} {% set ignored = state_attr('group.ignored_unavailable_entities','entity_id')\
|
|
\ %} {% set ignore_ts = (now().timestamp() - ignore_seconds)|as_datetime\
|
|
\ %} {% set entities = states|rejectattr('domain','eq','group')\n |rejectattr('last_changed','ge',ignore_ts)\n\
|
|
\ |selectattr('state','in',['unavailable','unknown']) %}\n{% set entities\
|
|
\ = entities|rejectattr('entity_id','in',ignored)\n if ignored != none\
|
|
\ else entities %}\n{{ entities|map(attribute='entity_id')|list }}\n"
|