Appdaemon => inactive (dead)


I have still error AttributeError: module ‘astral’ has no attribute ‘Location’. What does it mean? Thank you.

please post your appdaemon.yaml configuration so we can have a look.

I created virtual environment:

cd /home/pi
sudo mkdir appdaemon2
cd ./appdaemon2
python3 -m venv .

In activated the virtual environment:

python3 -m pip install wheel
python3 -m pip install appdaemon

Folder structure in virtual environment appdaemon2:
Folder structure in virtual environment conf:

In /etc/systemd/system/[email protected] (I created [email protected] for startup)

[email protected]
[email protected]

ExecStart=/home/pi/appdaemon2/bin/appdaemon -c "/home/%i/appdaemon2/conf"


I need active status in appdaeamon.

What is required configure in appdaemon.yaml for active status? Is required configuration of hadashboard, http, admin, api? I have row with=> token: xxxxx in secrets.yaml

My appdaemon.yaml (XXX.XX.XXX.XXX => I have real IP adres):

Error in log:

(appdaemon2) [email protected]:~/appdaemon2/conf $ tail -f /home/pi/appdaemon2/conf/logs/appdaemon.log
    self.AD = ad.AppDaemon(self.logging, loop, **appdaemon)
  File "/home/pi/appdaemon2/lib/python3.7/site-packages/appdaemon/", line 188, in __init__
    self.sched = scheduler.Scheduler(self)
  File "/home/pi/appdaemon2/lib/python3.7/site-packages/appdaemon/", line 54, in __init__
  File "/home/pi/appdaemon2/lib/python3.7/site-packages/appdaemon/", line 187, in init_sun
    self.location = astral.Location((
AttributeError: module 'astral' has no attribute 'Location'
2020-02-14 13:05:51.366489 INFO AppDaemon: Previous message repeated 1 times
2020-02-14 13:05:51.366777 INFO AppDaemon: AppDaemon Exited

Thank you

With appdaemon 3.0.1 it is OK, but problem with Error in authentication from appdaemon to HA.

same here:

sudo pip3 install appdaemon

2020-02-16 01:17:54.996889 INFO AppDaemon: AppDaemon Version 4.0.1 starting
2020-02-16 01:17:54.997721 INFO AppDaemon: Python version is 3.7.3
Configuration read from: /home/homeassistant/appdaemon/appdaemon.yaml
AttributeError: module 'astral' has no attribute 'Location'

even for minimal configuration

  time_zone: Europe/Berlin
  latitude: 12.345
  longitude: 12.345
  elevation: 1


In virtual environment: uninstall astral and install astral version 1.10.1



1 Like

The issue appears to be that the current appdaemon master branch has a non-versioned requirement of ‘astral’. See requirements.txt. Astral on Feb 10 released 2.x which auto-upgrades appdaemon builds. Unfortunately the new version has renamed one of its APIs breaking appdaemon.

The fix, for now, is:

  1. Don’t upgrade or rebuild appdaemon if you can avoid it.
  2. Install the dev version of appdaemon where this issue is fixed. Use: ‘pip install’ if using a virtual environment. Or update the respective line in your dockerfile to this if using containers. WARNING: if you haven’t yet upgraded from appdaemon==3.x, the bump to 4 will mean some breaking changes to take care of. Do what @roman.labovsky did if you can get away with it (I couldn’t as I’m on docker).
  3. If running dev branches isn’t for you, clone the master branch and change the line in requirements.txt and do step 2 with this version.

Or wait for a new release of appdaemon where this should be fixed.