Announcement: AppDaemon 4.0.6

Hello all, it’s been a while what with COVID and some time consuming events in my personal life. The good news is that @Odianosen25 really stepped up to get this release out, working very hard to get a bunch of PRs (thanks to all of you!), fixes and package updates into the release.

So, three cheers for Odianosen! I am dedicating this release to him :slight_smile:

Here is the list of changes - as usual, any questions can be asked here, or on our discord server:

4.0.6 (2021-03-21)


  • Added the ability to have access to metadata from HASS events - contributed by engrbm87 <>__
  • Added the ability to allow widget to make use of mouse events, which can then be sent to AD backend
  • Added the ability to add custom javascript code to dashboard - contributed by Rene Tode <>__
  • Added the ability to set deviceId on dashboard, via the dashboard URL - contributed by clyra <>__
  • Added the ability to navigate to different dashboards on different devices based on the set deviceId - contributed by clyra <>__
  • Added Icon widget service calls and state update delay - contributed by Jakub Macoun <>__
  • Improved the how the Alarm Panel Cancel button looks - contributed by Chris Johns <>__
  • Cancelling either an event, state, log or timer now returns a boolean value to indicate if executed or not
  • Added ability to have custom system packages installed in docker when it starts, by specifying the packagegs in a system_packages.txt file. - contributed by Sanjit Dutta <>__
  • Added ability for apps to create namespaces, and remove the created namespace. This namespaces are persistent by default
  • Added ability to persist plugin entities. This can be useful for example if wanting to persist entities within MQTT namespace
  • Moved the appdaemon reladed services to the admin namespace. So no more appdaemon namespace
  • Added services for creating, editting, removing, enabling, disabling apps
  • Added ability to receive binary payload from MQTT broker
  • Added cchardet <>__ and aiodns <>__ to improve aiohttp speed
  • Added the ability to submit tasks to executor threads
  • Added the ability to make use of uvloop to improve speed, compared to the default asyncio loop
  • Added the module_path and app config yaml_path to the app’s entity_id
  • Pinned requests to 2.25.1


  • Updated material design icons to v5.4.55 - contributed by Thomas Delaet <>__
  • Fixed get_now api, whereby it returned UTC time instead of local time
  • FIxed issue whereby when a non properly terminated app has an error, AD starts the app automatically
  • Fixed issue whereby it is possible to use the app api to “start” an already running app
  • Fixed issue whereby when app api is used, AD could hook itself since it gets into a loop depending on how the app is written
  • Fixed get_history_api for HASS - contributed by Ross Rosen <>__
  • Fixed issue with listen_state when immediate or duration is used with it
  • Fixed issue whereby when an invalid handler is used to cancel event/state/log/timer, it gives no warning its invalid
  • Fixed an issue with stream api using get_state api call
  • Fixed Azure packages by droping deprecated packages - contributed by freezeboy <>__
  • Prevent the ability for apps to register services in non-existent namespaces
  • Fixed issue with newly registered HASS services
  • Fix Cryptography Rust compile issue
  • Required example files are now being created by startup script - contributed by Alexandros Dorodoulis <>__
  • Fixed issues with Bumping astral - contributed by Werner Pieterson <>__
  • Bumped websocket-client from 0.57.0 to 0.58.0
  • Bumped pid from 2.2.5 to 3.0.4
  • Bumped pygments from 2.6.1 to 2.8.1
  • Bumped iso8601 from 0.1.12 to 0.1.14
  • Bumped pytz from 2019.3 to 2021.1
  • Bumped bcrypt from 3.1.7 to 3.2.0
  • Bumped feedparser from 5.2.1 to 6.0.2
  • Bumped yarl from 1.4.2 to 1.6.3
  • Bumped voluptuous from 0.11.7 to 0.12.1
  • Bumped pyyaml from 5.3 to 5.4.1
  • Bumped aiohttp-jinja2 from 1.2.0 to 1.4.2
  • Bumped jinja2 from 2.11.1 to 2.11.3
  • Bumped astral from 1.10.1 to 2.2
  • Bumped paho-mqtt from 1.5.0 to 1.5.1
  • Bumped aiohttp from 3.7.3 to 3.7.4
  • Bumped python-socketio from 4.4.2 to 4.6.1
  • Bumped deepdiff from 4.3.1 to 5.2.3
  • Bumped azure-mgmt-storage from 16.0.0 to 17.0.0
  • Bumped azure-storage-blob from 12.7.1 to 12.8.0
  • Bumped azure-mgmt-resource from 15.0.0 to 16.0.0
  • Bumped azure-mgmt-compute from 5.0.0 to 19.0.0
  • Fixed issue with socketIO, where the client is incompatible with server
  • Fix for multiarch docker builds, so Appdaemon is built for different platforms - contributed by Aleksey Sviridkin <>__ and Ben <>__
  • Fix for UVLOOP Windows compatibility - contributed by Steffen Fredriksen <>__
  • Fix for Hass Api async api - contributed by Oxan van Leeuwen <>__
  • Prevented the loading of hidden files into AD; those starting with a .
  • Prevented the loading of hidden python files into AD; those starting with a .
  • Prevented the loading of hidden folders into AD; those starting with a .
  • Fixed issue where when an app is stopped using api, when started it doesn’t respect the previous pin given to it by AD
  • Documentation fixes - contributed by Rock coaxial <>__
  • Documentation fixes - contributed by Bob Gray <>__
  • Documentation fixes - contributed by Ross Rosen <>__
  • Documentation fixes - contributed by Dougal Matthews <>__
  • Documentation fixes - contributed by Jason Lachowsky <>__
  • Documentation fixes - contributed by Jonas Pedersen <>__
  • Documentation fixes - contributed by chbndrhnns <>__
  • Documentation fixes - contributed by Addison Lynch <>__
  • Allowed for both multi and single level MQTT wildcard subscription
  • Ensured AD doesn’t break, when a “.” is used in app name, while it is ignored. Contributed by Xavi Moreno <>__
  • Fix for MQTT Listen Event using Async - contributed by Ross Rosen <>__
  • Fix for using async method as constraints, contributed by Mithras <>__

Breaking Changes

  • Those using non-existent namespaces to register app services, will need to create a UDN and use that to register the service as described here <>__
  • If using user defined namespace, there is need to delete the present ones in the namespaces directory.
  • Due to the removal of the appdaemon namespace, if anyone was manaully making a service call using it, will need to be updated
  • binary is now a reserved keyword argument used when listening to MQTT events
  • When using wildcard to listen for events within an app, only those used to subscribe to the broker can be used. so if using camera/# to subscribe to all camera related topics, AD will not recognise camera/front-door/# as a valid wildcard when listening for events; unless camera/front-door/# was used for subscription itself.
  • Moved the local static folder for serving static files from web to www. If using web already, simply add it to static_dirs in the http component as described here <>__

Sweet ! Good job.

Nice, seeing some cool new features :slight_smile:
Will the hassio add-on be updated as well in the next few days?

I was actually already working on that, as I can ship real quick nowadays. However, the release seems to be weird; as the AppDaemon release is missing on GitHub. I’ve opened up an issue for that:

1 Like

Should be fixed now - sorry!


AppDaemon dashboards not work on iPad mini and other device with iOS <=9.3.6. All my Home wall dash not work :frowning:


Awesome! Time to update my mdi-icons :slight_smile:

problem is found and will be solved in the next release.
look at the github issue for a temperary solution.


Hi ReneTode - thank you first of all. I’ve looked at the current/closed issues on github and was unable to find any solutions? Am i looking in the wrong place?

Like pavoroby I’m keen to get my iPad Mini dashboards working ASAP as they are the main control point for my home. I may look into restoring a previous snapshot of HA to resolve temporarily unless anyone has any other suggestions? Cheers guys

at least for old android tablets its solved.
there is an issue and a PR on github. so i guess you didnt look right :wink:

i was sure that the solution for android would also solve it for IOS users, but with help from another user im afraid that there might be another problem as well.

it will be solved as soon as possible.

if i got any news later on ill respond here as well.

1 Like

Yes it was me being stupid… seen it now… doh! Thank you for your efforts to resolve the problem. I’m sorry that extra work is required for such old devices. It’s one of the very few functions that iPad Mini’s (1st gen) can actually perform now :frowning: Thanks again, I’ll keep an eye out for progress, nice one :slight_smile:

1 Like

the problem is found, there is no easy workaround, but ill make a PR and it will be in the next release.
(and if im not mistaken that will be this weekend to resolve these problems)

1 Like

a link to the temporary solution would be helpful. since it isn’t clear here what the actual problem is, but all of my dashboards are now non-functional

there is a new release that solves it. will be available to hassio users as soon as frenck will update the addon.

All is working on my iOS devices since update today… many thanks to those involved :slight_smile:

1 Like

It’s work perfect after updete on Appdaemon addon version 0.5.1!
@ReneTode @frenck Thnx!

Thank you for your work!
I did not find further information about that point:

  • Added ability to persist plugin entities. This can be useful for example if wanting to persist entities within MQTT namespace

Could someone give me a hint where to find more informaiton about that? I’m looking for a way of making values of a HA sensor, that I created with AD, persistent.
One example: Every evening, an AD app calculates energy consumption from the power log. I would like to use a HA sensor that gets this value as a state an that state should be restored on reboot.
Can this new feature help me here?
I think I have some possibilities already:

  • don’t use AD, but use “Rieman Sum” integration in HA. I tried, but I have a lot of such sensors, and using a Rieman Sum sensor for each of them slowed the system down.
  • Use an input_text instead of a sensor (input_number will not work, as it can be small or large float values).
  • save the value in a User Defined Namespace and run an app at startup that creates the HA sensor again with the stored value (not sure if that would work)

But before I try one of these ways, I would like to understand the above-mentioned feature, if this could be a “cleaner” way.

This might be better to move to a new topic, but you can create a persistant sensor in HA through MQTT Discovery see here. MQTT Discovery - Home Assistant

Here is a small python script that creates a sensor, updates the state and the attributes and deletes the sensor if neccesary.
The sensor will show up with the last updated values after a restart of HA and no configuration is needed in HA apart from having MQTT activated.
This could easily be implemented as an appdaemon app since MQTT is available as a plugin.

import json
import paho.mqtt.publish as publish
import time
import datetime

PORT = 1883

def create_sensor(domain, entity, device_class):
    topic = "homeassistant/{}/{}/config".format(domain, entity)
    config = {"name": entity, 
                "device_class": device_class, 
                "state_topic": "homeassistant/{}/{}/state".format(domain, entity), 
                "json_attributes_topic": "homeassistant/{}/{}/attributes".format(domain, entity)}

    print(topic, config)
    publish.single(topic, json.dumps(config), hostname=HOSTNAME, port=PORT, retain=True)

def set_state(entity_id, state):
    domain, entity = split_entity(entity_id)
    topic = "homeassistant/{}/{}/state".format(domain, entity)
    publish.single(topic, state, hostname=HOSTNAME, port=PORT, retain=True)

def set_attributes(entity_id, attributes):
    domain, entity = split_entity(entity_id)
    topic = "homeassistant/{}/{}/attributes".format(domain, entity)
    publish.single(topic, json.dumps(attributes), hostname=HOSTNAME, port=PORT, retain=True)

def remove_sensor(entity_id):
    domain, entity = split_entity(entity_id)
    topic = "homeassistant/{}/{}/config".format(domain, entity)
    publish.single(topic, '', hostname=HOSTNAME, port=PORT, retain=False)

def split_entity(entity_id):
    return entity_id.split(".")[0],  entity_id.split(".")[1]

# Create a sensor. (domain, entity name, device_class)
create_sensor("binary_sensor", "my_sensor", "garage_door")
# Set the state.
set_state("binary_sensor.my_sensor", "ON")
# Set attributes.
set_attributes("binary_sensor.my_sensor", {"attribute_a": 12, "attribute_b": 13})
# time.sleep(5)
# remove_sensor("binary_sensor.my_sensor")
1 Like