Hi all,
I have the following script but it get stuck once in a while and i have to restart to return to normal. The script runs fine when it doesn’t get stuck.
Any idea of why? Thanks in advance.
heat_gas_on:
mode: restart
alias: heat_gas_on
# variables:
# warning_output: input_number.inverter_warning_output
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ states(''sensor.inverter_1_load_power'') | float + states(''input_number.inverter_warning_output'') | float / 4 >= states(''input_number.inverter_warning_output'') | float or states(''sensor.inverter_2_load_power'') | float + states(''input_number.inverter_warning_output'') | float / 4 >= states(''input_number.inverter_warning_output'') | float or states(''sensor.battery_power'') | float <= states(''input_number.inverter_warning_output'') | float * -2 }}'
sequence:
- delay: 00:00:01
- conditions:
- condition: time
after: '22:39:00'
before: '23:00:10'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
sequence:
- delay: 00:00:01
- conditions:
- condition: time
after: '00:40:00'
before: '01:00:10'
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
sequence:
- delay: 00:00:01
default:
- condition: or
conditions:
- condition: state
entity_id: group.is_home_1st
state: 'on'
- condition: state
entity_id: group.is_home_2nd
state: 'on'
- wait_template: '{{ is_state(''group.windows_1st'', ''off'') and is_state(''group.windows_2nd'', ''off'') and is_state(''group.doors_exterior'', ''off'') }}'
timeout: '00:01:45'
continue_on_timeout: false
- data:
hvac_mode: heat
temperature: '{{ states(''sensor.tstat_main_heat_target_value'') }}'
target:
entity_id: climate.living_room_homekit
service: climate.set_temperature
- target:
entity_id: input_boolean.hvac_by_automation
service: input_boolean.turn_on
- service: script.turn_on
target:
entity_id: script.heat_gas_on_turn_electric_heater_off