Update all integrations, cards, and other automatically at 3AM

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: Auto Update All Available Integrations
  description: >
    Automatically installs updates for all entities of type `update.*` 
    when an update becomes available or at a scheduled time.
  domain: automation
  input:
    run_time:
      name: Scheduled Time (optional)
      description: Time to auto-check for updates (24h format)
      default: "03:00:00"
      selector:
        time:

trigger:
  - platform: time
    at: !input run_time
  - platform: state
    entity_id:
      - sensor.time  # Helper for checking state periodically
    for:
      hours: 0
      minutes: 15
      seconds: 0

condition:
  - condition: template
    value_template: >
      {{ states.update | selectattr('state', 'eq', 'on') | list | count > 0 }}

action:
  - repeat:
      for_each: >
        {{ states.update
             | selectattr('state', 'eq', 'on')
             | map(attribute='entity_id')
             | list }}
      sequence:
        - service: update.install
          target:
            entity_id: "{{ repeat.item }}"
        - delay: "00:00:05"  # optional delay between updates

mode: single

Be careful with unattended updates.
Sometimes there are breaking changes and sometimes there are updated that should not be installed unless a specific version of HA core have been installed first.

1 Like

Yeah I was coming for the same thing. This one scares the hell out of me. I have more than once rebooted to a nonstartable HA box because of a bad integration. (they run in HA memory space so a crashed integration takes out HA) I like the auto compiler and things (and am totally… Borrowing it) but I will never ever ever autoinstall a HA update.

Now a list that an ai reads and says, boss I see I updates for… would you like these installed now? That I can get into.