initial commit
This commit is contained in:
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
secrets.yaml
|
||||
|
||||
__pycache__
|
||||
.python-version
|
||||
|
||||
dashboards/
|
||||
compiled/
|
||||
namespaces/
|
||||
www/
|
||||
14
appdaemon.code-workspace
Normal file
14
appdaemon.code-workspace
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"folders": [
|
||||
{
|
||||
"path": "../../root/appdaemon"
|
||||
},
|
||||
{
|
||||
"path": "../../root/appdaemon_dev"
|
||||
},
|
||||
{
|
||||
"path": "."
|
||||
}
|
||||
],
|
||||
"settings": {}
|
||||
}
|
||||
21
appdaemon.yaml
Normal file
21
appdaemon.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
appdaemon:
|
||||
import_method: expert
|
||||
# import_paths:
|
||||
# - /conf/apps/my_repo
|
||||
latitude: 0
|
||||
longitude: 0
|
||||
elevation: 30
|
||||
time_zone: America/Chicago
|
||||
plugins:
|
||||
HASS:
|
||||
type: hass
|
||||
ha_url: http://192.168.1.82:8123
|
||||
token: !secret long_lived_token
|
||||
http:
|
||||
url: http://0.0.0.0:5050
|
||||
admin:
|
||||
api:
|
||||
hadashboard:
|
||||
logs:
|
||||
main_log:
|
||||
level: DEBUG
|
||||
11
apps/apps.yaml
Normal file
11
apps/apps.yaml
Normal file
@@ -0,0 +1,11 @@
|
||||
hello_world:
|
||||
module: hello
|
||||
class: HelloWorld
|
||||
|
||||
hello_sub:
|
||||
module: my_pkg.my_sub_pkg.hello
|
||||
class: HelloWorldSub
|
||||
|
||||
motion:
|
||||
module: my_pkg
|
||||
class: Motion
|
||||
3
apps/apps.yaml.example
Normal file
3
apps/apps.yaml.example
Normal file
@@ -0,0 +1,3 @@
|
||||
hello_world:
|
||||
module: hello
|
||||
class: HelloWorld
|
||||
7
apps/hello.py
Executable file
7
apps/hello.py
Executable file
@@ -0,0 +1,7 @@
|
||||
import appdaemon.adbase as ad
|
||||
|
||||
class HelloWorld(ad.ADBase):
|
||||
def initialize(self):
|
||||
self.adapi = self.get_ad_api()
|
||||
self.log = self.adapi.log
|
||||
self.log(f'Initialized app from {__file__}')
|
||||
2
apps/my_repo/my_pkg/__init__.py
Normal file
2
apps/my_repo/my_pkg/__init__.py
Normal file
@@ -0,0 +1,2 @@
|
||||
from .motion import Motion
|
||||
from .my_sub_pkg.hello import HelloWorldSub
|
||||
8
apps/my_repo/my_pkg/motion.py
Normal file
8
apps/my_repo/my_pkg/motion.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import appdaemon.adbase as ad
|
||||
|
||||
class Motion(ad.ADBase):
|
||||
def initialize(self):
|
||||
self.adapi = self.get_ad_api()
|
||||
self.log = self.adapi.log
|
||||
self.log(f'Initialized app from {__file__}')
|
||||
# self.log(f'New log line asdfasdf')
|
||||
0
apps/my_repo/my_pkg/my_sub_pkg/__init__.py
Normal file
0
apps/my_repo/my_pkg/my_sub_pkg/__init__.py
Normal file
8
apps/my_repo/my_pkg/my_sub_pkg/hello.py
Normal file
8
apps/my_repo/my_pkg/my_sub_pkg/hello.py
Normal file
@@ -0,0 +1,8 @@
|
||||
import appdaemon.adbase as ad
|
||||
|
||||
class HelloWorldSub(ad.ADBase):
|
||||
def initialize(self):
|
||||
self.adapi = self.get_ad_api()
|
||||
self.log = self.adapi.log
|
||||
self.log(f'Initialized app from {__file__}')
|
||||
# self.log(f'CHANGED')
|
||||
0
apps/my_repo/pyproject.toml
Normal file
0
apps/my_repo/pyproject.toml
Normal file
14
docker-compose.yml
Normal file
14
docker-compose.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
version: '3.9'
|
||||
services:
|
||||
appdaemon:
|
||||
container_name: appdaemon_dev
|
||||
image: appdaemon:jsl-dev
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- /etc/timezone:/etc/timezone:ro
|
||||
- ./:/conf
|
||||
ports:
|
||||
- 5051:5050
|
||||
restart: unless-stopped
|
||||
tty: true
|
||||
# command: ["--debug", "DEBUG"]
|
||||
Reference in New Issue
Block a user