What would cause an automation to auto disable itself after a few seconds of being enabled?
I see nothing in the Core log (under Settings/System/Logs) and no warning in Settings or Notification. This is the automation:
alias: Présence - Martin le matin
description: ""
triggers:
- hours: "6"
minutes: "*"
trigger: time_pattern
- hours: "8"
minutes: "*"
trigger: time_pattern
conditions:
- condition: state
entity_id: input_boolean.thermostats_automatic
state: "on"
- condition: state
entity_id: person.martin
state: home
- condition: state
entity_id: climate.neviweb130_climate_martin
state:
- "off"
attribute: eco_status
- condition: or
conditions:
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.workday_today
state: "on"
- condition: time
after: "6:00:00"
before: "7:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
- condition: template
value_template: >-
{% set at_time = 7 * 60 %} {% set cur_time = now() %} {% set
cur_time = cur_time.hour * 60 + cur_time.minute %} {% set set_temp
= states.climate.neviweb130_climate_martin.attributes.temperature
| float %} {% set max_temp = 15.0 %} {% if
states('sensor.acurite_outside_temperature') == 'unavailable' or
states('sensor.acurite_outside_temperature') == 'unknown' %} {%
set out_temp = states('sensor.temperature') | float %} {% else %}
{% set out_temp = states('sensor.acurite_outside_temperature') |
float %} {% endif %} {{ at_time - cur_time == 0 or (set_temp <
20.0 and at_time - cur_time > 0 and out_temp < max_temp and
at_time - cur_time + out_temp * 1.5 - 30.0 < 0) }}
- condition: and
conditions:
- condition: state
entity_id: binary_sensor.workday_today
state: "off"
- condition: time
after: "08:00:00"
before: "09:00:00"
weekday:
- mon
- tue
- wed
- thu
- fri
- sat
- sun
- condition: template
value_template: >-
{% set at_time = 9 * 60 %} {% set cur_time = now() %} {% set
cur_time = cur_time.hour * 60 + cur_time.minute %} {% set set_temp
= states.climate.neviweb130_climate_martin.attributes.temperature
| float %} {% set max_temp = 15.0 %} {% if
states('sensor.acurite_outside_temperature') == 'unavailable' or
states('sensor.acurite_outside_temperature') == 'unknown' %} {%
set out_temp = states('sensor.temperature') | float %} {% else %}
{% set out_temp = states('sensor.acurite_outside_temperature') |
float %} {% endif %} {{ at_time - cur_time == 0 or (set_temp <
20.0 and at_time - cur_time > 0 and out_temp < max_temp and
at_time - cur_time + out_temp * 1.5 - 30.0 < 0) }}
actions:
- data_template:
temperature: >-
{% if is_state('binary_sensor.workday_today','on') %}22{% else %}21{%
endif %}
entity_id: climate.neviweb130_climate_martin
action: climate.set_temperature
- data_template:
temperature: >-
{% if is_state('binary_sensor.workday_today','on') %}22{% else %}21{%
endif %}
entity_id: climate.neviweb130_climate_martin_toilette
action: climate.set_temperature
mode: single
I have a very similar one (for another person and another bedroom) and it stays enabled. This is the difference between both:
1c1
< alias: Présence - Martin le matin
---
> alias: Présence - Michèle le matin
4c4
< - hours: "6"
---
> - hours: "5"
7c7
< - hours: "8"
---
> - hours: "7"
15c15
< entity_id: person.martin
---
> entity_id: person.michele
18c18
< entity_id: climate.neviweb130_climate_martin
---
> entity_id: climate.neviweb130_climate_michele
30,31c30,31
< after: "6:00:00"
< before: "7:00:00"
---
> after: "5:00:00"
> before: "6:00:00"
42c42
< {% set at_time = 7 * 60 %} {% set cur_time = now() %} {% set
---
> {% set at_time = 6 * 60 %} {% set cur_time = now() %} {% set
44c44
< = states.climate.neviweb130_climate_martin.attributes.temperature
---
> = states.climate.neviweb130_climate_michele.attributes.temperature
59,60c59,60
< after: "08:00:00"
< before: "09:00:00"
---
> after: "7:00:00"
> before: "8:00:00"
71c71
< {% set at_time = 9 * 60 %} {% set cur_time = now() %} {% set
---
> {% set at_time = 8 * 60 %} {% set cur_time = now() %} {% set
73c73
< = states.climate.neviweb130_climate_martin.attributes.temperature
---
> = states.climate.neviweb130_climate_michele.attributes.temperature
87c87
< entity_id: climate.neviweb130_climate_martin
---
> entity_id: climate.neviweb130_climate_michele
93c93
< entity_id: climate.neviweb130_climate_martin_toilette
---
> entity_id: climate.neviweb130_climate_bureau
No logic difference, just trigger times, persons and devices.
