appdaemon 4.5.7__tar.gz → 4.5.9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of appdaemon might be problematic. Click here for more details.
- {appdaemon-4.5.7/appdaemon.egg-info → appdaemon-4.5.9}/PKG-INFO +1 -1
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/__main__.py +1 -1
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/adapi.py +253 -62
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/adbase.py +2 -5
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/admin.py +2 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/app_management.py +49 -35
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/appdaemon.py +52 -49
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/dependency_manager.py +3 -2
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/events.py +14 -12
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/logging.py +6 -7
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/plugin.py +1 -1
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/internal/app_management.py +1 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugin_management.py +15 -4
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/hass/hassapi.py +37 -39
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/hass/hassplugin.py +273 -215
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/mqtt/mqttplugin.py +1 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/scheduler.py +1 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/state.py +7 -6
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/stream/adstream.py +4 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/stream/sockjs_handler.py +4 -1
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/threads.py +2 -2
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/utility_loop.py +9 -4
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/utils.py +9 -2
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/version.py +1 -1
- {appdaemon-4.5.7 → appdaemon-4.5.9/appdaemon.egg-info}/PKG-INFO +1 -1
- {appdaemon-4.5.7 → appdaemon-4.5.9}/LICENSE.md +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/MANIFEST.in +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/README.md +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/README.rst +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/admin_loop.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/appdaemon.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/css/app.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/css/chunk-vendors.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/favicon.ico +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/index.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/js/app.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/js/app.js.map +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/js/chunk-vendors.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/aui/js/chunk-vendors.js.map +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/all.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/climacons-font.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/default/dashboard.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/default/variables.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/fontawesome.min.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/fonts.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/glassic/dashboard.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/glassic/img/carbon1.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/glassic/img/carbon2.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/glassic/img/carbon3.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/glassic/img/carbon4.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/glassic/img/glassic_bg.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/glassic/variables.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/images/ui-icons_444444_256x240.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/images/ui-icons_555555_256x240.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/images/ui-icons_777620_256x240.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/images/ui-icons_777777_256x240.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/images/ui-icons_cc0000_256x240.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/images/ui-icons_ffffff_256x240.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/jquery-ui.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/jquery.gridster.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/main.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/materialdesignicons.min.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/non_dashboard.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/obsidian/dashboard.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/obsidian/img/obsidian_bg.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/obsidian/img/obsidian_w_bg.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/obsidian/img/obsidianbg.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/obsidian/img/widgetbg.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/obsidian/variables.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/rickshaw.min.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/simplyred/dashboard.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/simplyred/img/goldgradient.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/simplyred/img/goldtexture.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/simplyred/js/timer.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/simplyred/variables.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/v4-shims.min.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/zen/dashboard.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/zen/img/zen_bg.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/zen/img/zen_bg2.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/zen/img/zen_weatherbg.jpg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/css/zen/variables.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/TickingTimebombBB.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/climacons-webfont.eot +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/climacons-webfont.svg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/climacons-webfont.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/climacons-webfont.woff +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/digital-7-mono.eot +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/digital-7-mono.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/materialdesignicons-webfont.eot +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/materialdesignicons-webfont.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/materialdesignicons-webfont.woff +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/materialdesignicons-webfont.woff2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/fonts/repetition.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/Blank.gif +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/android-chrome-192x192.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/android-chrome-512x512.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/apple-touch-icon.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/browserconfig.xml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/favicon-16x16.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/favicon-32x32.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/favicon.ico +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/manifest.json +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/mstile-144x144.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/mstile-150x150.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/mstile-310x150.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/mstile-310x310.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/images/mstile-70x70.png +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/admin.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/d3.layout.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/d3.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/dashboard.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/gauge.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/jquery-3.1.1.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/jquery-ui.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/jquery.gridster.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/justgage.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/knockout-3.4.1.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/list.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/plotly.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/raphael-2.1.4.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/reconnecting-websocket.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/rickshaw.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/socket.io.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/sockjs.min.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/javascript/stream.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/admin.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/body_include.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/dashboard.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/dashinit.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/error.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/head_include.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/list.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/templates/logon.jinja2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-brands-400.eot +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-brands-400.svg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-brands-400.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-brands-400.woff +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-brands-400.woff2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-regular-400.eot +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-regular-400.svg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-regular-400.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-regular-400.woff +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-regular-400.woff2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-solid-900.eot +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-solid-900.svg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-solid-900.ttf +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-solid-900.woff +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/assets/webfonts/fa-solid-900.woff2 +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/callbacks.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/dashboard.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/dependency.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/entity.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/exceptions.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/futures.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/http.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/api.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/app.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/appdaemon.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/common.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/dashboard.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/http.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/log.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/misc.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/sequence.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/config/yaml.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/internal/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/internal/file_check.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/internal/plugin.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/internal/state.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/internal/threading.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/notification/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/notification/android.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/notification/base.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/models/notification/iOS.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/dummy/dummyapi.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/dummy/dummyplugin.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/hass/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/hass/exceptions.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/hass/models.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/hass/notifications.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/hass/utils.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/mqtt/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/plugins/mqtt/mqttapi.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/pyversions.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/sequences.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/services.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/stream/__init__.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/stream/socketio_handler.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/stream/ws_handler.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/thread_async.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/AdminLog.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/AdminSummary.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/AdminTable.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/alarm.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basealarm/basealarm.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basealarm/basealarm.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basealarm/basealarm.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basecamera/basecamera.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basecamera/basecamera.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basecamera/basecamera.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseclimate/baseclimate.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseclimate/baseclimate.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseclimate/baseclimate.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseclock/baseclock.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseclock/baseclock.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseclock/baseclock.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basedatetime/basedatetime.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basedatetime/basedatetime.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basedatetime/basedatetime.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basedisplay/basedisplay.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basedisplay/basedisplay.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basedisplay/basedisplay.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseentitypicture/baseentitypicture.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseentitypicture/baseentitypicture.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseentitypicture/baseentitypicture.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseerror/baseerror.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseerror/baseerror.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseerror/baseerror.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basefan/basefan.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basefan/basefan.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basefan/basefan.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basegauge/basegauge.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basegauge/basegauge.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basegauge/basegauge.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseheater/baseheater.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseheater/baseheater.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseheater/baseheater.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseicon/baseicon.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseicon/baseicon.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseicon/baseicon.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseiframe/baseiframe.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseiframe/baseiframe.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseiframe/baseiframe.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseinputnumber/baseinputnumber.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseinputnumber/baseinputnumber.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseinputnumber/baseinputnumber.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basejavascript/basejavascript.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basejavascript/basejavascript.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basejavascript/basejavascript.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baselight/baselight.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baselight/baselight.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baselight/baselight.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basemedia/basemedia.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basemedia/basemedia.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basemedia/basemedia.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseradial/baseradial.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseradial/baseradial.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseradial/baseradial.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baserss/baserss.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baserss/baserss.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baserss/baserss.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseselect/baseselect.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseselect/baseselect.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseselect/baseselect.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseslider/baseslider.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseslider/baseslider.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseslider/baseslider.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseswitch/baseswitch.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseswitch/baseswitch.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseswitch/baseswitch.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basetemperature/basetemperature.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basetemperature/basetemperature.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basetemperature/basetemperature.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basetext/basetext.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basetext/basetext.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/basetext/basetext.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseweather/baseweather.css +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseweather/baseweather.html +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/baseweather/baseweather.js +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/binary_sensor.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/camera.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/climate.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/clock.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/cover.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/device_tracker.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/entitypicture.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/fan.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/gauge.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/group.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/heater.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/icon.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/iframe.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/input_boolean.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/input_datetime.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/input_number.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/input_select.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/input_slider.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/input_text.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/javascript.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/label.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/light.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/lock.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/london_underground.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/media_player.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/mode.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/navigate.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/person.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/pirateweather.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/radial.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/reload.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/rss.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/scene.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/script.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/sensor.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/sequence.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/switch.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/temperature.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/text_sensor.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/weather.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon/widgets/weather_summary.yaml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon.egg-info/SOURCES.txt +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon.egg-info/dependency_links.txt +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon.egg-info/entry_points.txt +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon.egg-info/requires.txt +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/appdaemon.egg-info/top_level.txt +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/apps/hello.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/ObjectTracker/general_app_functions.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/ObjectTracker/objectcontrole.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/alexa.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/battery.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/bysykkel.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/commute.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/dark_day.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/door_notification.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/eventCache.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/eventMonitor.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/globals.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/grandfather.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/hwcheck.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/ical.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/minimote.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/modes.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/momentary_switch.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/motion_lights.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/motion_notification.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/occusim.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/outside_lights.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/presence.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/ruter.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/secure.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/sensor_notification.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/sensor_notify.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/sequence.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/smart_heat.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/sound.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/switch_reset.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/conf/example_apps/yr.py +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/pyproject.toml +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/setup.cfg +0 -0
- {appdaemon-4.5.7 → appdaemon-4.5.9}/tests/test_main.py +0 -0
|
@@ -17,10 +17,10 @@ from typing import TYPE_CHECKING, Any, Literal, TypeVar, overload
|
|
|
17
17
|
from appdaemon import dependency, utils
|
|
18
18
|
from appdaemon import exceptions as ade
|
|
19
19
|
from appdaemon.appdaemon import AppDaemon
|
|
20
|
-
from appdaemon.models.config.app import AppConfig
|
|
21
20
|
from appdaemon.entity import Entity
|
|
22
21
|
from appdaemon.events import EventCallback
|
|
23
22
|
from appdaemon.logging import Logging
|
|
23
|
+
from appdaemon.models.config.app import AppConfig
|
|
24
24
|
from appdaemon.state import StateCallback
|
|
25
25
|
|
|
26
26
|
T = TypeVar("T")
|
|
@@ -53,9 +53,6 @@ class ADAPI:
|
|
|
53
53
|
AD: AppDaemon
|
|
54
54
|
"""Reference to the top-level AppDaemon container object
|
|
55
55
|
"""
|
|
56
|
-
config_model: "AppConfig"
|
|
57
|
-
"""Pydantic model of the app configuration
|
|
58
|
-
"""
|
|
59
56
|
config: dict[str, Any]
|
|
60
57
|
"""Dict of the AppDaemon configuration. This meant to be read-only, and modifying it won't affect any behavior.
|
|
61
58
|
"""
|
|
@@ -116,7 +113,7 @@ class ADAPI:
|
|
|
116
113
|
namespace = kwargs["namespace"]
|
|
117
114
|
del kwargs["namespace"]
|
|
118
115
|
else:
|
|
119
|
-
namespace = self.
|
|
116
|
+
namespace = self.namespace
|
|
120
117
|
|
|
121
118
|
return namespace
|
|
122
119
|
|
|
@@ -132,7 +129,7 @@ class ADAPI:
|
|
|
132
129
|
|
|
133
130
|
@app_dir.setter
|
|
134
131
|
def app_dir(self, value: Path) -> None:
|
|
135
|
-
self.logger.warning(
|
|
132
|
+
self.logger.warning("app_dir is read-only and needs to be set before AppDaemon starts")
|
|
136
133
|
|
|
137
134
|
@property
|
|
138
135
|
def callback_counter(self) -> int:
|
|
@@ -140,7 +137,7 @@ class ADAPI:
|
|
|
140
137
|
|
|
141
138
|
@callback_counter.setter
|
|
142
139
|
def callback_counter(self, value: Path) -> None:
|
|
143
|
-
self.logger.warning(
|
|
140
|
+
self.logger.warning("callback_counter is read-only and is set internally by AppDaemon")
|
|
144
141
|
|
|
145
142
|
@property
|
|
146
143
|
def config_dir(self) -> Path:
|
|
@@ -149,7 +146,7 @@ class ADAPI:
|
|
|
149
146
|
|
|
150
147
|
@config_dir.setter
|
|
151
148
|
def config_dir(self, value: Path) -> None:
|
|
152
|
-
self.logger.warning(
|
|
149
|
+
self.logger.warning("config_dir is read-only and needs to be set before AppDaemon starts")
|
|
153
150
|
|
|
154
151
|
@property
|
|
155
152
|
def config_model(self) -> AppConfig:
|
|
@@ -183,7 +180,7 @@ class ADAPI:
|
|
|
183
180
|
|
|
184
181
|
@_logging.setter
|
|
185
182
|
def _logging(self, value: Logging) -> None:
|
|
186
|
-
self.logger.warning(
|
|
183
|
+
self.logger.warning("The _logging property is read-only")
|
|
187
184
|
|
|
188
185
|
@property
|
|
189
186
|
def name(self) -> str:
|
|
@@ -208,7 +205,16 @@ class ADAPI:
|
|
|
208
205
|
#
|
|
209
206
|
|
|
210
207
|
def _log(
|
|
211
|
-
self,
|
|
208
|
+
self,
|
|
209
|
+
logger: Logger,
|
|
210
|
+
msg: str,
|
|
211
|
+
level: str | int = "INFO",
|
|
212
|
+
*args,
|
|
213
|
+
ascii_encode: bool = True,
|
|
214
|
+
stack_info: bool = False,
|
|
215
|
+
stacklevel: int = 1,
|
|
216
|
+
extra: Mapping[str, object] | None = None,
|
|
217
|
+
**kwargs,
|
|
212
218
|
) -> None:
|
|
213
219
|
if ascii_encode:
|
|
214
220
|
msg = str(msg).encode("utf-8", "replace").decode("ascii", "replace")
|
|
@@ -291,7 +297,17 @@ class ADAPI:
|
|
|
291
297
|
|
|
292
298
|
self._log(logger, msg, level, *args, **kwargs)
|
|
293
299
|
|
|
294
|
-
def error(
|
|
300
|
+
def error(
|
|
301
|
+
self,
|
|
302
|
+
msg: str,
|
|
303
|
+
*args,
|
|
304
|
+
level: str | int = "INFO",
|
|
305
|
+
ascii_encode: bool = True,
|
|
306
|
+
stack_info: bool = False,
|
|
307
|
+
stacklevel: int = 1,
|
|
308
|
+
extra: Mapping[str, object] | None = None,
|
|
309
|
+
**kwargs,
|
|
310
|
+
) -> None:
|
|
295
311
|
"""Logs a message to AppDaemon's error logfile.
|
|
296
312
|
|
|
297
313
|
Args:
|
|
@@ -316,11 +332,28 @@ class ADAPI:
|
|
|
316
332
|
>>> self.error("Some Critical string", level = "CRITICAL")
|
|
317
333
|
|
|
318
334
|
"""
|
|
319
|
-
self._log(
|
|
335
|
+
self._log(
|
|
336
|
+
self.err,
|
|
337
|
+
msg,
|
|
338
|
+
level,
|
|
339
|
+
*args,
|
|
340
|
+
ascii_encode=ascii_encode or self.AD.config.ascii_encode,
|
|
341
|
+
stack_info=stack_info,
|
|
342
|
+
stacklevel=stacklevel,
|
|
343
|
+
extra=extra,
|
|
344
|
+
**kwargs,
|
|
345
|
+
)
|
|
320
346
|
|
|
321
347
|
@utils.sync_decorator
|
|
322
348
|
async def listen_log(
|
|
323
|
-
self,
|
|
349
|
+
self,
|
|
350
|
+
callback: Callable,
|
|
351
|
+
level: str | int = "INFO",
|
|
352
|
+
namespace: str = "admin",
|
|
353
|
+
log: str | None = None,
|
|
354
|
+
pin: bool | None = None,
|
|
355
|
+
pin_thread: int | None = None,
|
|
356
|
+
**kwargs,
|
|
324
357
|
) -> list[str] | None:
|
|
325
358
|
"""Register a callback for whenever an app logs a message.
|
|
326
359
|
|
|
@@ -360,7 +393,16 @@ class ADAPI:
|
|
|
360
393
|
>>> self.handle = self.listen_log(self.cb, "WARNING", log="my_custom_log")
|
|
361
394
|
|
|
362
395
|
"""
|
|
363
|
-
return await self.AD.logging.add_log_callback(
|
|
396
|
+
return await self.AD.logging.add_log_callback(
|
|
397
|
+
namespace=namespace,
|
|
398
|
+
name=self.name,
|
|
399
|
+
callback=callback,
|
|
400
|
+
level=level,
|
|
401
|
+
log=log,
|
|
402
|
+
pin=pin,
|
|
403
|
+
pin_thread=pin_thread,
|
|
404
|
+
**kwargs,
|
|
405
|
+
)
|
|
364
406
|
|
|
365
407
|
@utils.sync_decorator
|
|
366
408
|
async def cancel_listen_log(self, handle: str) -> None:
|
|
@@ -623,8 +665,13 @@ class ADAPI:
|
|
|
623
665
|
|
|
624
666
|
"""
|
|
625
667
|
new_namespace = await self.AD.state.add_namespace(namespace, writeback, persist, self.name)
|
|
626
|
-
|
|
627
|
-
|
|
668
|
+
match new_namespace:
|
|
669
|
+
case Path() | str():
|
|
670
|
+
new_namespace = str(new_namespace)
|
|
671
|
+
self.AD.state.app_added_namespaces.add(new_namespace)
|
|
672
|
+
return new_namespace
|
|
673
|
+
case _:
|
|
674
|
+
self.logger.warning("Namespace %s already exists or was not created", namespace)
|
|
628
675
|
|
|
629
676
|
@utils.sync_decorator
|
|
630
677
|
async def remove_namespace(self, namespace: str) -> dict[str, Any] | None:
|
|
@@ -735,7 +782,13 @@ class ADAPI:
|
|
|
735
782
|
#
|
|
736
783
|
|
|
737
784
|
@utils.sync_decorator
|
|
738
|
-
async def add_entity(
|
|
785
|
+
async def add_entity(
|
|
786
|
+
self,
|
|
787
|
+
entity_id: str,
|
|
788
|
+
state: str | dict[str, Any],
|
|
789
|
+
attributes: dict | None = None,
|
|
790
|
+
namespace: str | None = None,
|
|
791
|
+
) -> None:
|
|
739
792
|
"""Adds a non-existent entity, by creating it within a namespaces.
|
|
740
793
|
|
|
741
794
|
If an entity doesn't exists and needs to be created, this function can be used to create it locally.
|
|
@@ -762,11 +815,7 @@ class ADAPI:
|
|
|
762
815
|
>>> self.add_entity('mqtt.living_room_temperature', namespace='mqtt')
|
|
763
816
|
|
|
764
817
|
"""
|
|
765
|
-
|
|
766
|
-
if self.entity_exists(entity_id, namespace):
|
|
767
|
-
self.logger.warning("%s already exists, will not be adding it", entity_id)
|
|
768
|
-
return None
|
|
769
|
-
|
|
818
|
+
namespace = namespace or self.namespace
|
|
770
819
|
return await self.AD.state.add_entity(namespace, entity_id, state, attributes)
|
|
771
820
|
|
|
772
821
|
@utils.sync_decorator
|
|
@@ -905,7 +954,7 @@ class ADAPI:
|
|
|
905
954
|
return self.AD.plugins.get_plugin_meta(namespace)
|
|
906
955
|
|
|
907
956
|
@utils.sync_decorator
|
|
908
|
-
async def friendly_name(self, entity_id: str, namespace: str | None = None) -> str:
|
|
957
|
+
async def friendly_name(self, entity_id: str, namespace: str | None = None) -> str | None:
|
|
909
958
|
"""Gets the Friendly Name of an entity.
|
|
910
959
|
|
|
911
960
|
Args:
|
|
@@ -927,14 +976,13 @@ class ADAPI:
|
|
|
927
976
|
"""
|
|
928
977
|
namespace = namespace or self.namespace
|
|
929
978
|
self._check_entity(namespace, entity_id)
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
#
|
|
937
|
-
# return None
|
|
979
|
+
return await self.get_state(
|
|
980
|
+
entity_id=entity_id,
|
|
981
|
+
attribute="friendly_name",
|
|
982
|
+
default=entity_id,
|
|
983
|
+
namespace=namespace,
|
|
984
|
+
copy=False,
|
|
985
|
+
) # fmt: skip
|
|
938
986
|
|
|
939
987
|
@utils.sync_decorator
|
|
940
988
|
async def set_production_mode(self, mode: bool = True) -> bool | None:
|
|
@@ -1216,7 +1264,12 @@ class ADAPI:
|
|
|
1216
1264
|
#
|
|
1217
1265
|
|
|
1218
1266
|
@utils.sync_decorator
|
|
1219
|
-
async def register_endpoint(
|
|
1267
|
+
async def register_endpoint(
|
|
1268
|
+
self,
|
|
1269
|
+
callback: Callable[[Any, dict], Any],
|
|
1270
|
+
endpoint: str | None = None,
|
|
1271
|
+
**kwargs,
|
|
1272
|
+
) -> str | None: # fmt: skip
|
|
1220
1273
|
"""Registers an endpoint for API calls into the current App.
|
|
1221
1274
|
|
|
1222
1275
|
Args:
|
|
@@ -1279,7 +1332,12 @@ class ADAPI:
|
|
|
1279
1332
|
#
|
|
1280
1333
|
|
|
1281
1334
|
@utils.sync_decorator
|
|
1282
|
-
async def register_route(
|
|
1335
|
+
async def register_route(
|
|
1336
|
+
self,
|
|
1337
|
+
callback: Callable[[Any, dict], Any],
|
|
1338
|
+
route: str | None = None,
|
|
1339
|
+
**kwargs: dict[str, Any],
|
|
1340
|
+
) -> str | None: # fmt: skip
|
|
1283
1341
|
"""Registers a route for Web requests into the current App.
|
|
1284
1342
|
By registering an app web route, this allows to make use of AD's internal web server to serve
|
|
1285
1343
|
web clients. All routes registered using this api call, can be accessed using
|
|
@@ -1528,8 +1586,17 @@ class ADAPI:
|
|
|
1528
1586
|
|
|
1529
1587
|
# pre-fill some arguments here
|
|
1530
1588
|
add_callback = functools.partial(
|
|
1531
|
-
self.AD.state.add_state_callback,
|
|
1532
|
-
|
|
1589
|
+
self.AD.state.add_state_callback,
|
|
1590
|
+
name=self.name,
|
|
1591
|
+
namespace=namespace,
|
|
1592
|
+
cb=callback,
|
|
1593
|
+
timeout=timeout,
|
|
1594
|
+
oneshot=oneshot,
|
|
1595
|
+
immediate=immediate,
|
|
1596
|
+
pin=pin,
|
|
1597
|
+
pin_thread=pin_thread,
|
|
1598
|
+
kwargs=kwargs,
|
|
1599
|
+
) # fmt: skip
|
|
1533
1600
|
|
|
1534
1601
|
match entity_id:
|
|
1535
1602
|
case str() | None:
|
|
@@ -1597,7 +1664,7 @@ class ADAPI:
|
|
|
1597
1664
|
namespace: str | None = None,
|
|
1598
1665
|
copy: bool = True,
|
|
1599
1666
|
**kwargs, # left in intentionally for compatibility
|
|
1600
|
-
) -> Any | dict[str, Any] | None:
|
|
1667
|
+
) -> Any | dict[str, Any] | None: # fmt: skip
|
|
1601
1668
|
"""Get the state of an entity from AppDaemon's internals.
|
|
1602
1669
|
|
|
1603
1670
|
Home Assistant emits a ``state_changed`` event for every state change, which it sends to AppDaemon over the
|
|
@@ -1655,12 +1722,26 @@ class ADAPI:
|
|
|
1655
1722
|
if kwargs:
|
|
1656
1723
|
self.logger.warning(f"Extra kwargs passed to get_state, will be ignored: {kwargs}")
|
|
1657
1724
|
|
|
1658
|
-
return await self.AD.state.get_state(
|
|
1725
|
+
return await self.AD.state.get_state(
|
|
1726
|
+
name=self.name,
|
|
1727
|
+
namespace=namespace or self.namespace,
|
|
1728
|
+
entity_id=entity_id,
|
|
1729
|
+
attribute=attribute,
|
|
1730
|
+
default=default,
|
|
1731
|
+
copy=copy,
|
|
1732
|
+
)
|
|
1659
1733
|
|
|
1660
1734
|
@utils.sync_decorator
|
|
1661
1735
|
async def set_state(
|
|
1662
|
-
self,
|
|
1663
|
-
|
|
1736
|
+
self,
|
|
1737
|
+
entity_id: str,
|
|
1738
|
+
state: Any | None = None,
|
|
1739
|
+
namespace: str | None = None,
|
|
1740
|
+
attributes: dict[str, Any] | None = None,
|
|
1741
|
+
replace: bool = False,
|
|
1742
|
+
check_existence: bool = True,
|
|
1743
|
+
**kwargs: Any,
|
|
1744
|
+
) -> dict[str, Any] | None:
|
|
1664
1745
|
"""Update the state of the specified entity.
|
|
1665
1746
|
|
|
1666
1747
|
This causes a ``state_changed`` event to be emitted in the entity's namespace. If that namespace is associated
|
|
@@ -1703,7 +1784,15 @@ class ADAPI:
|
|
|
1703
1784
|
namespace = namespace or self.namespace
|
|
1704
1785
|
if check_existence:
|
|
1705
1786
|
self._check_entity(namespace, entity_id)
|
|
1706
|
-
return await self.AD.state.set_state(
|
|
1787
|
+
return await self.AD.state.set_state(
|
|
1788
|
+
name=self.name,
|
|
1789
|
+
namespace=namespace,
|
|
1790
|
+
entity=entity_id,
|
|
1791
|
+
state=state,
|
|
1792
|
+
attributes=attributes,
|
|
1793
|
+
replace=replace,
|
|
1794
|
+
**kwargs,
|
|
1795
|
+
)
|
|
1707
1796
|
|
|
1708
1797
|
#
|
|
1709
1798
|
# Services
|
|
@@ -1815,7 +1904,7 @@ class ADAPI:
|
|
|
1815
1904
|
self,
|
|
1816
1905
|
service: str,
|
|
1817
1906
|
namespace: str | None = None,
|
|
1818
|
-
timeout: str | int | float | None =
|
|
1907
|
+
timeout: str | int | float | None = -1, # Used by utils.sync_decorator
|
|
1819
1908
|
callback: Callable[[Any], Any] | None = None,
|
|
1820
1909
|
**data: Any,
|
|
1821
1910
|
) -> Any:
|
|
@@ -1903,6 +1992,9 @@ class ADAPI:
|
|
|
1903
1992
|
for e in eid:
|
|
1904
1993
|
self._check_entity(namespace, e)
|
|
1905
1994
|
|
|
1995
|
+
if timeout != -1:
|
|
1996
|
+
data["timeout"] = timeout
|
|
1997
|
+
|
|
1906
1998
|
domain, service_name = service.split("/", 2)
|
|
1907
1999
|
coro = self.AD.services.call_service(namespace=namespace, domain=domain, service=service_name, data=data)
|
|
1908
2000
|
if callback is None:
|
|
@@ -2015,7 +2107,7 @@ class ADAPI:
|
|
|
2015
2107
|
self,
|
|
2016
2108
|
callback: EventCallback,
|
|
2017
2109
|
event: str | Iterable[str] | None = None,
|
|
2018
|
-
*,
|
|
2110
|
+
*, # Arguments after this are keyword only
|
|
2019
2111
|
namespace: str | Literal["global"] | None = None,
|
|
2020
2112
|
timeout: str | int | float | timedelta | None = None,
|
|
2021
2113
|
oneshot: bool = False,
|
|
@@ -2025,7 +2117,6 @@ class ADAPI:
|
|
|
2025
2117
|
) -> str | list[str]:
|
|
2026
2118
|
"""Register a callback for a specific event, multiple events, or any event.
|
|
2027
2119
|
|
|
2028
|
-
|
|
2029
2120
|
The callback needs to have the following form:
|
|
2030
2121
|
|
|
2031
2122
|
>>> def my_callback(self, event_name: str, event_data: dict[str, Any], **kwargs: Any) -> None: ...
|
|
@@ -2093,8 +2184,16 @@ class ADAPI:
|
|
|
2093
2184
|
|
|
2094
2185
|
# pre-fill some arguments here
|
|
2095
2186
|
add_callback = functools.partial(
|
|
2096
|
-
self.AD.events.add_event_callback,
|
|
2097
|
-
|
|
2187
|
+
self.AD.events.add_event_callback,
|
|
2188
|
+
name=self.name,
|
|
2189
|
+
namespace=namespace or self.namespace,
|
|
2190
|
+
cb=callback,
|
|
2191
|
+
timeout=timeout,
|
|
2192
|
+
oneshot=oneshot,
|
|
2193
|
+
pin=pin,
|
|
2194
|
+
pin_thread=pin_thread,
|
|
2195
|
+
kwargs=kwargs,
|
|
2196
|
+
) # fmt: skip
|
|
2098
2197
|
|
|
2099
2198
|
match event:
|
|
2100
2199
|
case str() | None:
|
|
@@ -2168,7 +2267,13 @@ class ADAPI:
|
|
|
2168
2267
|
return await self.AD.events.info_event_callback(self.name, handle)
|
|
2169
2268
|
|
|
2170
2269
|
@utils.sync_decorator
|
|
2171
|
-
async def fire_event(
|
|
2270
|
+
async def fire_event(
|
|
2271
|
+
self,
|
|
2272
|
+
event: str,
|
|
2273
|
+
namespace: str | None = None,
|
|
2274
|
+
timeout: str | int | float | timedelta | None = -1, # Used by utils.sync_decorator
|
|
2275
|
+
**kwargs,
|
|
2276
|
+
) -> None:
|
|
2172
2277
|
"""Fires an event on the AppDaemon bus, for apps and plugins.
|
|
2173
2278
|
|
|
2174
2279
|
Args:
|
|
@@ -2186,6 +2291,11 @@ class ADAPI:
|
|
|
2186
2291
|
>>> self.fire_event("MY_CUSTOM_EVENT", jam="true")
|
|
2187
2292
|
|
|
2188
2293
|
"""
|
|
2294
|
+
# The event might need the timeout argument passed through
|
|
2295
|
+
if timeout != -1: # Only pass through valid values, which includes None
|
|
2296
|
+
# Convert to float if it's not None
|
|
2297
|
+
timeout = utils.parse_timedelta(timeout).total_seconds() if timeout is not None else timeout
|
|
2298
|
+
kwargs["timeout"] = timeout
|
|
2189
2299
|
namespace = namespace or self.namespace
|
|
2190
2300
|
await self.AD.events.fire_event(namespace, event, **kwargs)
|
|
2191
2301
|
|
|
@@ -2206,8 +2316,10 @@ class ADAPI:
|
|
|
2206
2316
|
nums = list(
|
|
2207
2317
|
map(
|
|
2208
2318
|
int,
|
|
2209
|
-
re.split(r"[^\d]", utc_string)[
|
|
2210
|
-
|
|
2319
|
+
re.split(r"[^\d]", utc_string)[
|
|
2320
|
+
:-1
|
|
2321
|
+
], # split by anything that's not a number and skip the last part for AM/PM
|
|
2322
|
+
),
|
|
2211
2323
|
)[:7] # Use a max of 7 parts
|
|
2212
2324
|
return dt.datetime(*nums).timestamp() + self.get_tz_offset() * 60
|
|
2213
2325
|
|
|
@@ -2261,7 +2373,14 @@ class ADAPI:
|
|
|
2261
2373
|
return await self.AD.sched.sun_down()
|
|
2262
2374
|
|
|
2263
2375
|
@utils.sync_decorator
|
|
2264
|
-
async def parse_time(
|
|
2376
|
+
async def parse_time(
|
|
2377
|
+
self,
|
|
2378
|
+
time_str: str,
|
|
2379
|
+
name: str | None = None,
|
|
2380
|
+
aware: bool = False,
|
|
2381
|
+
today: bool = False,
|
|
2382
|
+
days_offset: int = 0,
|
|
2383
|
+
) -> dt.time:
|
|
2265
2384
|
"""Creates a `time` object from its string representation.
|
|
2266
2385
|
|
|
2267
2386
|
This functions takes a string representation of a time, or sunrise,
|
|
@@ -2308,10 +2427,23 @@ class ADAPI:
|
|
|
2308
2427
|
05:33:17
|
|
2309
2428
|
|
|
2310
2429
|
"""
|
|
2311
|
-
return await self.AD.sched.parse_time(
|
|
2430
|
+
return await self.AD.sched.parse_time(
|
|
2431
|
+
time_str=time_str,
|
|
2432
|
+
name=name or self.name,
|
|
2433
|
+
aware=aware,
|
|
2434
|
+
today=today,
|
|
2435
|
+
days_offset=days_offset,
|
|
2436
|
+
)
|
|
2312
2437
|
|
|
2313
2438
|
@utils.sync_decorator
|
|
2314
|
-
async def parse_datetime(
|
|
2439
|
+
async def parse_datetime(
|
|
2440
|
+
self,
|
|
2441
|
+
time_str: str,
|
|
2442
|
+
name: str | None = None,
|
|
2443
|
+
aware: bool = False,
|
|
2444
|
+
today: bool = False,
|
|
2445
|
+
days_offset: int = 0,
|
|
2446
|
+
) -> dt.datetime:
|
|
2315
2447
|
"""Creates a `datetime` object from its string representation.
|
|
2316
2448
|
|
|
2317
2449
|
This function takes a string representation of a date and time, or sunrise,
|
|
@@ -2360,7 +2492,13 @@ class ADAPI:
|
|
|
2360
2492
|
>>> self.parse_datetime("sunrise + 01:00:00")
|
|
2361
2493
|
2019-08-16 06:33:17
|
|
2362
2494
|
"""
|
|
2363
|
-
return await self.AD.sched.parse_datetime(
|
|
2495
|
+
return await self.AD.sched.parse_datetime(
|
|
2496
|
+
time_str=time_str,
|
|
2497
|
+
name=name or self.name,
|
|
2498
|
+
aware=aware,
|
|
2499
|
+
today=today,
|
|
2500
|
+
days_offset=days_offset,
|
|
2501
|
+
)
|
|
2364
2502
|
|
|
2365
2503
|
@utils.sync_decorator
|
|
2366
2504
|
async def get_now(self, aware: bool = True) -> dt.datetime:
|
|
@@ -2398,7 +2536,13 @@ class ADAPI:
|
|
|
2398
2536
|
async def now_is_between(self, start_time: str, end_time: str, now: str) -> bool: ...
|
|
2399
2537
|
|
|
2400
2538
|
@utils.sync_decorator
|
|
2401
|
-
async def now_is_between(
|
|
2539
|
+
async def now_is_between(
|
|
2540
|
+
self,
|
|
2541
|
+
start_time: str | dt.datetime,
|
|
2542
|
+
end_time: str | dt.datetime,
|
|
2543
|
+
name: str | None = None,
|
|
2544
|
+
now: str | None = None,
|
|
2545
|
+
) -> bool:
|
|
2402
2546
|
"""Determine if the current `time` is within the specified start and end times.
|
|
2403
2547
|
|
|
2404
2548
|
This function takes two string representations of a ``time`` ()or ``sunrise`` or ``sunset`` offset) and returns
|
|
@@ -2739,7 +2883,16 @@ class ADAPI:
|
|
|
2739
2883
|
>>> handle = self.run_once(self.delayed_callback, "sunrise + 01:00:00")
|
|
2740
2884
|
|
|
2741
2885
|
"""
|
|
2742
|
-
return await self.run_at(
|
|
2886
|
+
return await self.run_at(
|
|
2887
|
+
callback,
|
|
2888
|
+
start,
|
|
2889
|
+
*args,
|
|
2890
|
+
random_start=random_start,
|
|
2891
|
+
random_end=random_end,
|
|
2892
|
+
pin=pin,
|
|
2893
|
+
pin_thread=pin_thread,
|
|
2894
|
+
**kwargs,
|
|
2895
|
+
)
|
|
2743
2896
|
|
|
2744
2897
|
@utils.sync_decorator
|
|
2745
2898
|
async def run_at(
|
|
@@ -2961,7 +3114,17 @@ class ADAPI:
|
|
|
2961
3114
|
>>> self.run_hourly(self.run_hourly_c, runtime)
|
|
2962
3115
|
|
|
2963
3116
|
"""
|
|
2964
|
-
return await self.run_every(
|
|
3117
|
+
return await self.run_every(
|
|
3118
|
+
callback,
|
|
3119
|
+
start,
|
|
3120
|
+
timedelta(hours=1),
|
|
3121
|
+
*args,
|
|
3122
|
+
random_start=random_start,
|
|
3123
|
+
random_end=random_end,
|
|
3124
|
+
pin=pin,
|
|
3125
|
+
pin_thread=pin_thread,
|
|
3126
|
+
**kwargs,
|
|
3127
|
+
)
|
|
2965
3128
|
|
|
2966
3129
|
@utils.sync_decorator
|
|
2967
3130
|
async def run_minutely(
|
|
@@ -3013,7 +3176,17 @@ class ADAPI:
|
|
|
3013
3176
|
>>> self.run_minutely(self.run_minutely_c, time)
|
|
3014
3177
|
|
|
3015
3178
|
"""
|
|
3016
|
-
return await self.run_every(
|
|
3179
|
+
return await self.run_every(
|
|
3180
|
+
callback,
|
|
3181
|
+
start,
|
|
3182
|
+
timedelta(minutes=1),
|
|
3183
|
+
*args,
|
|
3184
|
+
random_start=random_start,
|
|
3185
|
+
random_end=random_end,
|
|
3186
|
+
pin=pin,
|
|
3187
|
+
pin_thread=pin_thread,
|
|
3188
|
+
**kwargs,
|
|
3189
|
+
)
|
|
3017
3190
|
|
|
3018
3191
|
@utils.sync_decorator
|
|
3019
3192
|
async def run_every(
|
|
@@ -3294,7 +3467,15 @@ class ADAPI:
|
|
|
3294
3467
|
# Dashboard
|
|
3295
3468
|
#
|
|
3296
3469
|
|
|
3297
|
-
def dash_navigate(
|
|
3470
|
+
def dash_navigate(
|
|
3471
|
+
self,
|
|
3472
|
+
target: str,
|
|
3473
|
+
timeout: str | int | float | timedelta | None = -1, # Used by utils.sync_decorator
|
|
3474
|
+
ret: str | None = None,
|
|
3475
|
+
sticky: int = 0,
|
|
3476
|
+
deviceid: str | None = None,
|
|
3477
|
+
dashid: str | None = None,
|
|
3478
|
+
) -> None:
|
|
3298
3479
|
"""Forces all connected Dashboards to navigate to a new URL.
|
|
3299
3480
|
|
|
3300
3481
|
Args:
|
|
@@ -3331,15 +3512,13 @@ class ADAPI:
|
|
|
3331
3512
|
"""
|
|
3332
3513
|
kwargs = {"command": "navigate", "target": target, "sticky": sticky}
|
|
3333
3514
|
|
|
3334
|
-
if timeout != -1:
|
|
3335
|
-
kwargs["timeout"] = timeout
|
|
3336
3515
|
if ret is not None:
|
|
3337
3516
|
kwargs["return"] = ret
|
|
3338
3517
|
if deviceid is not None:
|
|
3339
3518
|
kwargs["deviceid"] = deviceid
|
|
3340
3519
|
if dashid is not None:
|
|
3341
3520
|
kwargs["dashid"] = dashid
|
|
3342
|
-
self.fire_event("ad_dashboard", **kwargs)
|
|
3521
|
+
self.fire_event("ad_dashboard", timeout=timeout, **kwargs)
|
|
3343
3522
|
|
|
3344
3523
|
#
|
|
3345
3524
|
# Async
|
|
@@ -3369,7 +3548,13 @@ class ADAPI:
|
|
|
3369
3548
|
future = self.AD.loop.run_in_executor(self.AD.executor, preloaded_function)
|
|
3370
3549
|
return await future
|
|
3371
3550
|
|
|
3372
|
-
def submit_to_executor(
|
|
3551
|
+
def submit_to_executor(
|
|
3552
|
+
self,
|
|
3553
|
+
func: Callable[..., T],
|
|
3554
|
+
*args,
|
|
3555
|
+
callback: Callable | None = None,
|
|
3556
|
+
**kwargs,
|
|
3557
|
+
) -> Future[T]:
|
|
3373
3558
|
"""Submit a sync function from within another sync function to be executed using a thread from AppDaemon's
|
|
3374
3559
|
internal thread pool.
|
|
3375
3560
|
|
|
@@ -3438,7 +3623,13 @@ class ADAPI:
|
|
|
3438
3623
|
return future
|
|
3439
3624
|
|
|
3440
3625
|
@utils.sync_decorator
|
|
3441
|
-
async def create_task(
|
|
3626
|
+
async def create_task(
|
|
3627
|
+
self,
|
|
3628
|
+
coro: Coroutine[Any, Any, T],
|
|
3629
|
+
callback: Callable | None = None,
|
|
3630
|
+
name: str | None = None,
|
|
3631
|
+
**kwargs,
|
|
3632
|
+
) -> asyncio.Task[T]:
|
|
3442
3633
|
"""Wrap the `coro` coroutine into a ``Task`` and schedule its execution. Return the ``Task`` object.
|
|
3443
3634
|
|
|
3444
3635
|
Uses AppDaemon's internal event loop to run the task, so the task will be run in the same thread as the app.
|
|
@@ -4,10 +4,8 @@ from logging import Logger
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import TYPE_CHECKING, Any
|
|
6
6
|
|
|
7
|
-
from appdaemon import adapi
|
|
8
|
-
from appdaemon import
|
|
9
|
-
from appdaemon.models.config.app import AppConfig, AllAppConfig
|
|
10
|
-
|
|
7
|
+
from appdaemon import adapi, utils
|
|
8
|
+
from appdaemon.models.config.app import AllAppConfig, AppConfig
|
|
11
9
|
|
|
12
10
|
# Check if the module is being imported using the legacy method
|
|
13
11
|
if __name__ == Path(__file__).name:
|
|
@@ -79,7 +77,6 @@ class ADBase:
|
|
|
79
77
|
args: dict
|
|
80
78
|
"""Dictionary of the app configuration
|
|
81
79
|
"""
|
|
82
|
-
|
|
83
80
|
_namespace: str
|
|
84
81
|
|
|
85
82
|
logger: Logger
|