Last active
February 12, 2025 17:23
-
-
Save Geek-MD/876be645e55d477d5d7153c4e710c770 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint: Updates Notificator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: Home Assistant Updates Notificator | |
description: Execute actions when an update is available for an integration, theme, card, or add-on within a specific time range. | |
domain: automation | |
author: Edison Montes @_GeekMD_ | |
homeassistant: | |
min_version: 2024.6.0 | |
input: | |
start_time: | |
name: Start Time | |
description: The start time for checking available updates. | |
default: "08:00:00" | |
selector: | |
time: {} | |
end_time: | |
name: End Time | |
description: The end time for checking available updates. | |
default: "22:00:00" | |
selector: | |
time: {} | |
actions: | |
name: Actions | |
description: Actions to be executed when an update is available. Use `{{ updates }}` in messages to include the names of available updates. | |
selector: | |
action: {} | |
variables: | |
updates: > | |
{{ states.update | selectattr('state', 'eq', 'on') | map(attribute='attributes.friendly_name') | list }} | |
trigger: | |
- platform: state | |
entity_id: | |
- update.home_assistant_core_update | |
- update.home_assistant_supervisor_update | |
- update.home_assistant_operating_system_update | |
- update.home_assistant_frontend_update | |
to: "on" | |
- platform: time | |
at: !input start_time | |
condition: | |
- condition: template | |
value_template: "{{ updates | length > 0 }}" | |
- condition: time | |
after: !input start_time | |
before: !input end_time | |
action: | |
- choose: | |
- conditions: [] | |
sequence: !input actions | |
mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment