Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

automation is not running #2

Open
hindseb opened this issue Mar 11, 2023 · 5 comments
Open

automation is not running #2

hindseb opened this issue Mar 11, 2023 · 5 comments

Comments

@hindseb
Copy link

hindseb commented Mar 11, 2023

This is related to the blueprint: auto_update_scheduled.yaml

Hi, Thank you for creating the blueprint. I highly appreciate the efforts in creating it.

I created automation based on the blueprint. It is triggered, but it is not running.

It is stopped at the 3rd condition.
image

When checking the traces (see below), I believe the trigger status is swapped. It is from "on" to "off". Should it not be from "off" to ''on"?
How can this be changed? Is this something that needs to be updated in the blueprint?

Best, Sebastian

this:
entity_id: automation.auto_update_home_assistant_on_a_schedule_base
state: 'on'
attributes:
last_triggered: '2023-03-09T08:00:00.011443+00:00'
mode: single
current: 1
id: '1678241096997'
friendly_name: Update_Auto Home Assistant on a schedule base
last_changed: '2023-03-08T15:17:58.497737+00:00'
last_updated: '2023-03-09T08:00:00.011657+00:00'
context:
id: 01GV2P4M06X5FS3YBZZA2KV825
parent_id: 01GV2P4M010K7XBKQWAXQ86WB9
user_id: null
trigger:
id: HA Schedule based
idx: '0'
alias: null
platform: state
entity_id: schedule.auto_update_schedule
from_state:
entity_id: schedule.auto_update_schedule
state: 'on'
attributes:
editable: true
next_event: '2023-03-09T03:30:00-05:00'
friendly_name: Auto_Update_Schedule
last_changed: '2023-03-09T08:00:00.001905+00:00'
last_updated: '2023-03-09T08:00:00.001905+00:00'
context:
id: 01GV2P4M010K7XBKQWAXQ86WB9
parent_id: null
user_id: null
to_state:
entity_id: schedule.auto_update_schedule
state: 'off'
attributes:
editable: true
next_event: '2023-03-10T03:00:00-05:00'
friendly_name: Auto_Update_Schedule
last_changed: '2023-03-09T08:30:00.002221+00:00'
last_updated: '2023-03-09T08:30:00.002221+00:00'
context:
id: 01GV2QVHT2HKT4C7YD7NDAW0NH
parent_id: null
user_id: null
for: null
attribute: null
description: state of schedule.auto_update_schedule
input_schedule_monthday: 1
input_pause_entities: []
temp_input_update_exclusions: []
input_update_exclusions: []

@edwardtfn
Copy link
Owner

If you go to Developer Tools > Status and look for your schedule (schedule.auto_update_schedule?), what is this status?

Could you please share your automation's yaml formatted as code?

I'm using this exactly same version and it is working fine with me, so it is probably something in your settings.

@hindseb
Copy link
Author

hindseb commented Mar 12, 2023

Hi, thanks for looking into it.

The status of the schedule is currently 'off'. (8:50pm)
The schedule is set up to become 'on' at 3am every day for 30min.
(Also, the automation is triggered when it returns to 'off' at 3.30am)

My automation's yaml is:
- id: '1678241096997' alias: Update_Auto Home Assistant on a schedule base description: '' use_blueprint: path: edwardtfn/auto_update_scheduled.yaml input: restart_bool: true schedule_entity: schedule.auto_update_schedule actions_pre_update: - service: notify.mobile_app_iphoneseb data: message: Updates are installed for {{ updates_list }} actions_pre_restart: - service: notify.mobile_app_iphoneseb data: message: Updates done, restarting actions_pos_update: - service: notify.mobile_app_iphoneseb data: message: Updates completed for {{ updates_list }}

Thanks a lot for your help in advance.
Best, Sebastian

@edwardtfn
Copy link
Owner

Your automation is set to backup before the updates, could y you please double check if you don't have a backup started around 03:00AM?
You can try increasing the time for the update. Now is only 30min, try increasing that to 3h, or so, and let me know the result.
Also, if you could take a look in your Logbook and filter for the past 24h for only the activity related to this automation, please share the results with me.

@hindseb
Copy link
Author

hindseb commented Mar 13, 2023

hi,
Thanks for looking into this. No, I don't have any other backup started at 3 am.
I increased the helper to 3h as recommended.

Here are the logs as requested:
March 9, 2023
Auto-update Done! triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
4:00:23 AM - 3 days ago
Auto-update Running post-update actions... triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
4:00:18 AM - 3 days ago
Auto-update 0 item(s) pending a restart: - triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
4:00:18 AM - 3 days ago
Auto-update Remaining updates: - Home Assistant Core Update triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
4:00:18 AM - 3 days ago
Auto-update Finishing update process. triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
4:00:18 AM - 3 days ago
Auto-update Backup triggered. triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
3:00:18 AM - 3 days ago
Auto-update Backing up Home Assistant. triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
3:00:08 AM - 3 days ago
Auto-update Running pre-update actions... triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
3:00:07 AM - 3 days ago
Auto-update List of updates: - Home Assistant Core Update triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
3:00:07 AM - 3 days ago
Auto-update A new update is available for Home Assistant. triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
3:00:07 AM - 3 days ago
Auto-update Variables: input_backup_bool: True, input_restart_bool: True, input_schedule_monthday: 1, input_update_exclusions: [], input_core_os_update_mode: all, input_firmware_update_mode: all, updates_list: ['update.home_assistant_core_update'] triggered by automation Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
3:00:07 AM - 3 days ago
Update_Auto Home Assistant on a schedule base triggered by state of Auto_Update_Schedule
3:00:00 AM - 3 days ago

In the logs, it seems like that is run at 3am. But why did it re-trigger at 3.30am, see my first screenshot?

@edwardtfn
Copy link
Owner

I've just uploaded an updated version. Could you please try that one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants