Skip to content

Home Assistant restart causes old configuration to be loaded. #2509

@Nuudel1

Description

@Nuudel1

What happened?

Hi,

Noticed during restart of Home Assistant that Appdaemon (thru add-on) does start applications, which are removed from apps.yaml. This happens only during HA restart. Reboot for HA or reboot for Appdaemon add-on fetches the latest configuration from file into use. Version of Appdaemon add-on: 0.17.13.

Expected behavior: Latest configuration written to file should be used after Home Assistant Reboot instead of shadow copy / cached configuration.

Cheers,
Tommi

Version

4.5.12

Installation type

Home Assistant add-on

Relevant log output

--- Reboot Home Assistant ---
-----------------------------------------------------------
 Add-on: AppDaemon
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.17.13
 You are running the latest version of this add-on.
 System: Home Assistant OS 16.3  (amd64 / qemux86-64)
 Home Assistant Core: 2025.12.4
 Home Assistant Supervisor: 2025.12.3
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-appdaemon: starting
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
[23:51:35] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
2025-12-21 23:51:38.751967 INFO AppDaemon: ------------------------------------------------------------
2025-12-21 23:51:38.752088 INFO AppDaemon: AppDaemon Version 4.5.12 starting
2025-12-21 23:51:38.752203 INFO AppDaemon: ------------------------------------------------------------
2025-12-21 23:51:38.752340 INFO AppDaemon: Python version is 3.12.12
2025-12-21 23:51:38.752488 INFO AppDaemon: Configuration read from: /config/appdaemon.yaml
2025-12-21 23:51:38.753161 INFO AppDaemon: Using /config/apps as app_dir
2025-12-21 23:51:38.754387 INFO AppDaemon: Loading built-in plugin 'HASS' using 'HassPlugin' from 'appdaemon.plugins.hass.hassplugin'
2025-12-21 23:51:38.754685 INFO HASS: HASS Plugin initialization complete
2025-12-21 23:51:38.754916 INFO AppDaemon: Initializing HTTP
2025-12-21 23:51:38.755373 INFO AppDaemon: Using 'ws' for event stream
2025-12-21 23:51:38.757205 INFO AppDaemon: Starting API
2025-12-21 23:51:38.758514 INFO AppDaemon: Starting Admin Interface
2025-12-21 23:51:38.758797 INFO AppDaemon: Starting Dashboards
2025-12-21 23:51:38.760982 INFO AppDaemon: Scheduler running in realtime
2025-12-21 23:51:38.761523 INFO AppDaemon: Starting apps with 61 worker threads. Apps will all be assigned threads and pinned to them.
2025-12-21 23:51:38.779386 INFO AppDaemon: Running on port 5050
2025-12-21 23:51:38.779719 INFO AppDaemon: Waiting for plugins to be ready
2025-12-21 23:51:38.780470 INFO HASS: Connected to Home Assistant 2025.12.4 with aiohttp websocket
2025-12-21 23:51:38.781473 INFO HASS: Authenticated to Home Assistant 2025.12.4
2025-12-21 23:51:38.782540 INFO HASS: Waiting for Home Assistant to start
2025-12-21 23:51:38.794902 INFO AppDaemon: All plugins ready
2025-12-21 23:51:38.807507 INFO HASS: Completed initialization in 47.330ms
2025-12-21 23:51:38.878310 INFO AppDaemon: Starting apps: [..., 'button_trigger_office_lights', ...]
...
2025-12-21 23:51:39.391485 INFO AppDaemon: Calling initialize() for button_trigger_office_lights

--- Delete app from config --- 
2025-12-21 23:52:27.112689 INFO AppDaemon: App config deleted: button_trigger_office_lights
2025-12-21 23:52:27.141103 INFO AppDaemon: Stopping apps: ['button_trigger_office_lights']
2025-12-21 23:52:27.141740 INFO AppDaemon: Stopped app 'button_trigger_office_lights'

--- Restart Home Assistant ---
2025-12-21 23:52:57.355886 ERROR HASS: 
2025-12-21 23:52:57.356087 INFO HASS: Attempting reconnection in 5.0s
2025-12-21 23:52:57.388680 INFO AppDaemon: Stopping apps from namespace 'default' because the plugin failed
2025-12-21 23:52:57.389234 INFO AppDaemon: Stopping apps: [..., 'button_trigger_office_lights', ...]
...
2025-12-21 23:52:57.406923 INFO AppDaemon: Stopped app 'button_trigger_office_lights'
...
2025-12-21 23:53:02.358350 ERROR HASS: Cannot connect to host 192.168.x.x:80 ssl:default [Connect call failed ('192.168.x.x', 80)]
2025-12-21 23:53:02.358542 INFO HASS: Attempting reconnection in 5.0s
2025-12-21 23:53:07.360214 ERROR HASS: Cannot connect to host 192.168.x.x:80 ssl:default [Connect call failed ('192.168.x.x', 80)]
2025-12-21 23:53:07.360493 INFO HASS: Attempting reconnection in 5.0s
2025-12-21 23:53:12.362526 INFO HASS: Connected to Home Assistant 2025.12.4 with aiohttp websocket
2025-12-21 23:53:12.363216 INFO HASS: Authenticated to Home Assistant 2025.12.4
2025-12-21 23:53:12.363950 INFO HASS: Waiting for Home Assistant to start
2025-12-21 23:53:20.554794 INFO HASS: Home Assistant fully started after 8.2s
2025-12-21 23:53:20.586881 INFO HASS: Completed initialization in 8.2s
2025-12-21 23:53:20.620363 INFO AppDaemon: Processing restart for plugin namespace 'default'
2025-12-21 23:53:20.621801 INFO AppDaemon: Starting apps: [..., 'button_trigger_office_lights', ...]
...
2025-12-21 23:53:22.460172 INFO AppDaemon: Calling initialize() for button_trigger_office_lights
...

Relevant code in the app or config file that caused the issue

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    issueSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions