John Lancaster 03ebbcc1f0 added variant
2024-07-08 17:55:32 -05:00
2024-07-08 17:55:32 -05:00
2024-05-04 21:54:37 -05:00
2024-02-21 21:23:05 -06:00
2024-06-06 20:58:00 -05:00
2024-06-06 21:16:12 -05:00
2024-06-06 21:16:12 -05:00
2024-06-06 21:16:12 -05:00
2024-06-06 23:37:29 -05:00

AppDaemon Dev

Setup

Secrets

Needs a long-lived token for HA in secrets.yaml

Debugger

Use with VSCode's debugger using a launch.json file.

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "AppDaemon Dev",
            "type": "debugpy",
            "request": "launch",
            "module": "appdaemon",
            "justMyCode": true,
            "args": "-c ../conf"
        },
    ]
}

Test Script

#!/bin/bash
set -e

SCRIPT_DIR=$(readlink -f $(dirname "${BASH_SOURCE[0]}"))
REPO_DIR=$(dirname $SCRIPT_DIR)

echo $REPO_DIR
cd $REPO_DIR

rm -rf ./dist

# isort ./appdaemon ./docs/conf.py

black ./appdaemon ./docs/conf.py

pre-commit run --all-files

python -m pytest

python -m build

docker build -t appdaemon:local-dev .

cd ../conf
docker compose run -it --rm appdaemon

Reference

  • importlib.reload(module)
  • AppManagement.check_app_updates
    • AppManagement._load_reload_modules
    • AppManagement._load_apps
      • AppManagement.init_object
Description
Dev config directory for AppDaemon development
Readme 82 KiB
Languages
Jupyter Notebook 80.8%
Python 19.2%