updates
This commit is contained in:
@@ -1,63 +0,0 @@
|
||||
hello_world:
|
||||
module: hello
|
||||
class: HelloWorld
|
||||
|
||||
simple_app:
|
||||
module: simple
|
||||
class: SimpleApp
|
||||
extra: 1234
|
||||
dependencies:
|
||||
- hello_world
|
||||
|
||||
Perimeter:
|
||||
# dependencies:
|
||||
# - rules
|
||||
# - statemachine
|
||||
# - hal
|
||||
module: perimeter
|
||||
class: Perimeter
|
||||
another_arg: 1234
|
||||
|
||||
|
||||
sequence:
|
||||
kitchen_loop:
|
||||
name: Kitchen Loop
|
||||
hot_reload: True
|
||||
loop: True
|
||||
steps:
|
||||
- homeassistant/toggle:
|
||||
entity_id: light.kitchen
|
||||
- sleep: 3
|
||||
# - homeassistant/turn_on:
|
||||
# entity_id: light.kitchen
|
||||
# - sleep: 2
|
||||
# - homeassistant/turn_off:
|
||||
# entity_id: light.kitchen
|
||||
# - sleep: 2
|
||||
|
||||
office_on:
|
||||
name: Office On
|
||||
steps:
|
||||
- homeassistant/turn_on:
|
||||
entity_id: light.office_1
|
||||
brightness: 254
|
||||
- homeassistant/turn_on:
|
||||
entity_id: light.office_2
|
||||
brightness: 255
|
||||
- sleep: 31
|
||||
office_off:
|
||||
name: Office Off
|
||||
steps:
|
||||
- homeassistant/turn_off:
|
||||
entity_id: light.office_1
|
||||
- homeassistant/turn_off:
|
||||
entity_id: light.office_2
|
||||
|
||||
andarotajo:
|
||||
module: andarotajo
|
||||
class: GoogleDrive
|
||||
dependencies:
|
||||
- hello_world
|
||||
- globals
|
||||
# - perimeter
|
||||
# - simple_app
|
||||
@@ -9,3 +9,4 @@ class Rule1:
|
||||
class Rule2:
|
||||
value: int
|
||||
other: str = "default" # test changing this
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from appdaemon.adapi import ADAPI
|
||||
|
||||
from child import Child
|
||||
|
||||
|
||||
0
conf/apps/food-repo/README.md
Normal file
0
conf/apps/food-repo/README.md
Normal file
@@ -12,7 +12,7 @@ class GreenEggs(Eggs):
|
||||
|
||||
@dataclass
|
||||
class Menu:
|
||||
dishes: List[FoodItem] = field(init=False)
|
||||
dishes: List[type[FoodItem]] = field(init=False)
|
||||
|
||||
def __post_init__(self):
|
||||
self.dishes = [GreenEggs, Ham]
|
||||
|
||||
16
conf/apps/food-repo/src/food/utils.py
Normal file
16
conf/apps/food-repo/src/food/utils.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from enum import Enum, auto
|
||||
|
||||
|
||||
class Utensil(Enum):
|
||||
KNIFE = auto()
|
||||
FORK = auto()
|
||||
SPOON = auto()
|
||||
PLATE = auto()
|
||||
BOWL = auto()
|
||||
CUP = auto()
|
||||
GLASS = auto()
|
||||
MUG = auto()
|
||||
POT = auto()
|
||||
PAN = auto()
|
||||
|
||||
GLOBAL_VAR = Utensil.FORK
|
||||
@@ -1,6 +0,0 @@
|
||||
from appdaemon.adapi import ADAPI
|
||||
|
||||
|
||||
class HelloWorld(ADAPI):
|
||||
def initialize(self):
|
||||
self.log(f'{self.__class__.__name__} Initialized')
|
||||
@@ -1,17 +0,0 @@
|
||||
from appdaemon.adapi import ADAPI
|
||||
|
||||
import hal
|
||||
# import statemachine
|
||||
import rules
|
||||
import utils
|
||||
|
||||
|
||||
import datetime
|
||||
|
||||
class Perimeter(ADAPI):
|
||||
def initialize(self):
|
||||
self.hal = hal.HAL('arg4')
|
||||
self.rules = rules.Rule1('abc'), rules.Rule2(123)
|
||||
self.log(f'Initialized perimeter: {self.hal.args}')
|
||||
self.log(f'Rules: {self.rules}')
|
||||
self.log(f'{utils.CONSTANTS}')
|
||||
36
conf/apps/scratch.yaml
Normal file
36
conf/apps/scratch.yaml
Normal file
@@ -0,0 +1,36 @@
|
||||
# scratch1:
|
||||
# module: "scratch"
|
||||
# class: "Scratch"
|
||||
# priority: 1
|
||||
# dependencies:
|
||||
# - scratch2
|
||||
|
||||
dummy:
|
||||
module: dummy
|
||||
class: Dummy
|
||||
dependencies:
|
||||
- dev
|
||||
|
||||
eboon:
|
||||
module: eboon
|
||||
class: Eboon
|
||||
|
||||
dev:
|
||||
module: notifications
|
||||
class: NotifyDev
|
||||
|
||||
# scratch3:
|
||||
# module: "scratch"
|
||||
# class: "Scratch"
|
||||
# scratch4:
|
||||
# module: "scratch"
|
||||
# class: "Scratch"
|
||||
# scratch5:
|
||||
# module: "scratch"
|
||||
# class: "Scratch"
|
||||
# scratch6:
|
||||
# module: "scratch"
|
||||
# class: "Scratch"
|
||||
# scratch7:
|
||||
# module: "scratch"
|
||||
# class: "Scratch"
|
||||
10
conf/apps/simple_app/apps.yaml
Normal file
10
conf/apps/simple_app/apps.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
hello_world:
|
||||
module: hello
|
||||
class: HelloWorld
|
||||
|
||||
simple_app:
|
||||
module: simple
|
||||
class: SimpleApp
|
||||
extra: 1234
|
||||
dependencies:
|
||||
- hello_world
|
||||
14
conf/apps/simple_app/hello.py
Normal file
14
conf/apps/simple_app/hello.py
Normal file
@@ -0,0 +1,14 @@
|
||||
from typing import Any
|
||||
|
||||
from appdaemon.adapi import ADAPI
|
||||
|
||||
|
||||
class HelloWorld(ADAPI):
|
||||
def initialize(self):
|
||||
self.log(f'{self.__class__.__name__} Initialized')
|
||||
self.register_service("my_domain/my_exciting_service", self.my_exciting_cb)
|
||||
|
||||
def my_exciting_cb(self, *args: str, my_arg: int = 0, **kwargs: Any) -> Any:
|
||||
namespace, domain, service = args
|
||||
self.log(f"Service {domain}/{service} in the {namespace} namepsace called with {kwargs}")
|
||||
return 999 + my_arg
|
||||
Reference in New Issue
Block a user