Compare commits

...

3 Commits

Author SHA1 Message Date
John Lancaster
68d34a31b1 removed globals from import string 2025-02-03 23:11:48 -06:00
John Lancaster
e2e83ed579 added sequences 2025-02-03 23:11:26 -06:00
John Lancaster
2c7fd70945 submodule update 2025-02-03 23:10:33 -06:00
4 changed files with 49 additions and 7 deletions

View File

@@ -9,9 +9,30 @@ simple_app:
- hello_world
Perimeter:
dependencies:
- rules
- statemachine
- hal
# dependencies:
# - rules
# - statemachine
# - hal
module: perimeter
class: Perimeter
another_arg: 1234
sequence:
office_on:
name: Office On
namespace: hass
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

View File

@@ -19,3 +19,22 @@ parent_app:
grand-parent_app:
module: grand_parent
class: GrandParent
sequence:
setup_tv:
name: Setup TV
namespace: hass
steps:
- homeassistant/turn_on:
entity_id: switch.living_room_tv
- sleep: 30
- remote/send_command:
entity_id: roku.living_room
loop_step:
times: 5
interval: 0.5

View File

@@ -3,13 +3,15 @@ from appdaemon.adapi import ADAPI
import hal
# import statemachine
import rules
import globals.utils
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'{globals.utils.CONSTANTS}')
self.log(f'{utils.CONSTANTS}')