Hi
I noticed that the last 2-3 days “something” is turning off all my automations. It is happening sometime in the morning. I don’t know if I changed something or what-where to look for.
If you check the History view, what else happened at the moment (“7 hours ago”) when the automations were turned off?
In your screenshot, there’s a very narrow red line to the left of the word On
in the history chart for each entity. It suggests that all of the entities were off
for a very brief period. Does that event correspond to the time when all automations were turned off?
Yes.Thats why I show it.
below I see that was also triggered the following automation. (I was messing with it today)
# PURGE DATABASE **************************************************************
- alias: Purge Database
initial_state: false
trigger:
platform: time
at: '02:22:22'
action:
service: recorder.purge
data:
keep_days: 1
repack: true
However this happened and yesterday, and the day before and I wasn’t doing anything with it
Is it only automations that experienced a state-change at that moment in time, or are there any other entities (input_boolean, switch, timer, etc) that also had a state-change?
I’m trying to understand how widespread was the event. Did it only affect automations or did it affect other entities as well.
Only the automations. I read somewhere in the forum that this might happening if I restart HA before it is full started. However I am not sure that this is the case because as I said this happened 3 days in a row
I assume you did not manually restart Home Assistant early every morning during those 3 days?
Can you confirm that the system did not restart (by itself) at that time? I’m just trying to narrow the field of what might be causing this issue.
No I am not sure about it, I was messing with HA these days.
I will have to wait and see what will happen tomorrow I guess.
Happened again before a while. I didn’t restart at all. So it is not the restart…
As I can see in history happened twice today…
grep your configuration directory for the command automation.turn_off
I did that. I have it for 2-3 automations and 2-3 inout booleans.
When an automation fires I get something like the following in logbook which is correct
Night Lights turn off has been triggered by time
6:10:00 AM - 5 hours ago
Can you paste all 6 please?
Edit, the catalyst is “floor lights on at sunset” according to both screenshots.
no, it is ny first automation in the automation file and they turned off one after one in a row
only these input booleans triggered tomorrow and the above night lights automation
Turn off Summer Covers input_boolean has been triggered by time
7:02:00 AM - 4 hours ago
Turn off lux input_boolean has been triggered by time
7:00:00 AM - 5 hours ago
But that one is different, it doesn’t have the automation logo next to it, and it always appears as the first one at the time the rest switch off. There is nothing before it in the logbook that state changes to affect the others.
If you’re not going to paste any relevant parts of your configuration we can’t help.
sorry, you meant to post my automations and input booleans?
Yup, you said there were 6 examples of automation.turn_off, we need to see them in context please.
ok, I don’t have automation.turn_off at all. I have only home.assistant.turn_off
## Turn on/off indoor lights randomly
- id: Night_Lights
alias: Night_Lights
initial_state: True
trigger:
platform: time_pattern
minutes: '/8'
condition:
condition: time
after: '01:30:00'
before: '05:20:00'
action:
# Every 11 to 16 minutes.
- delay: "00:{{ '{:02}'.format(range(3, 8) | random | int) }}:00"
- service: homeassistant.turn_off
data_template:
entity_id: "{{ state_attr('group.night_simulation', 'entity_id')[states('input_number.light_sequence') | int] }}"
- service: input_number.set_value
data_template:
entity_id: input_number.light_sequence
# Add 1 and wrap around.
value: "{{(states('input_number.light_sequence') | int + 1 ) % expand(states.group.night_simulation) | list | count }}"
# Wait a few seconds
- delay: "00:00:{{ '{:02}'.format(range(7, 20) | random | int) }}"
# Turn on the next thing in the sequence
- service: homeassistant.turn_on
data_template:
entity_id: "{{ state_attr('group.night_simulation', 'entity_id')[states('input_number.light_sequence') | int] }}"
# ↑ For Covers Close in Summer Time ↑ **********************************************************
- id: Turn off Summer Covers input_boolean #For Floorlight on low light
alias: Turn off Summer Covers input_boolean
trigger:
platform: time
at: '07:02:00'
action:
service: homeassistant.turn_off
entity_id: input_boolean.summer_close_covers
# For Floorlight on low light ***************************************************
- id: Turn off lux input_boolean #For Floorlight on low light
alias: Turn off lux input_boolean
trigger:
platform: time
at: '07:00:00'
action:
service: homeassistant.turn_off
entity_id: input_boolean.enable_lux
# For Morning_Report ***********************************************************
- id: Turn off morning_report input_boolean #For Floorlight on low light
alias: Turn off morning_report input_boolean
trigger:
platform: time
at: '11:05:00'
action:
service: homeassistant.turn_off
entity_id: input_boolean.morning_report
##CREATE Spotcast snapshot scene create
- alias: Spotcast snapshot scene create
initial_state: false
trigger:
platform: time_pattern
minutes: '/20'
condition: []
action:
- service: scene.create
data:
scene_id: before
snapshot_entities:
- media_player.spotify_makisk_ismak
- media_player.bose
- service: homeassistant.turn_off
entity_id: media_player.bose
# Tent Tent_windy ************************************************************
- id: Tent_windyy
alias: Tent windy
trigger:
platform: numeric_state
entity_id: sensor.wind_speed_automation
above: 33
condition:
condition: or
conditions:
- condition: state
entity_id: cover.50758014840d8e918614
state: "unknown"
- condition: state
entity_id: cover.50758014840d8e918614
state: "open"
action:
- service: cover.close_cover
entity_id: cover.50758014840d8e918614
- service: homeassistant.turn_off
entity_id: automation.tent_windy
one more thing to add. although in the logbook says that my automations are turned off I think that actual they are not. at least as I can see from the following card
However I did noticed yesterday and the day before that one particular automation which worked fine before the last 2 days never triggered. the following
## Floorlight on Low Light ****************************************************
- id: Floorlight on Low Light
alias: Floorlight on Low Light
trigger:
platform: numeric_state
entity_id: sensor.motion_sensor
below: 77
for:
minutes: 1
condition:
- condition: state
entity_id: input_boolean.enable_lux
state: 'off'
- condition: state
entity_id: sensor.someone_home
state: "True"
- condition: time
after: '16:30:00'
before: '20:45:00'
action:
- service: homeassistant.turn_on
entity_id: group.kitchen_led
- service: switch.turn_on
entity_id: switch.sonoff_10001bb5c7
- service: light.turn_on
entity_id: light.77626641ecfabc976395
- service: input_boolean.turn_on
entity_id: input_boolean.enable_lux
Hmmm, can you paste “floor lights on at sunset” please?