created stages dir
This commit is contained in:
@@ -1,53 +1,3 @@
|
|||||||
# hello_world:
|
hello-world:
|
||||||
# module: hello
|
module: hello
|
||||||
# class: HelloWorld
|
class: HelloWorld
|
||||||
|
|
||||||
|
|
||||||
bar_lights:
|
|
||||||
module: light
|
|
||||||
class: StagedLight
|
|
||||||
stages:
|
|
||||||
- start: '03:00 am'
|
|
||||||
scene:
|
|
||||||
light.bar:
|
|
||||||
state: on
|
|
||||||
color_temp_kelvin: 4500
|
|
||||||
brightness: 25
|
|
||||||
- start: '09:00 am'
|
|
||||||
scene:
|
|
||||||
light.bar:
|
|
||||||
state: on
|
|
||||||
color_temp_kelvin: 3500
|
|
||||||
brightness: 100
|
|
||||||
- start: '13:00'
|
|
||||||
scene:
|
|
||||||
light.bar:
|
|
||||||
state: on
|
|
||||||
color_temp_kelvin: 2500
|
|
||||||
brightness: 150
|
|
||||||
- start: 'sunset'
|
|
||||||
scene:
|
|
||||||
light.bar:
|
|
||||||
state: on
|
|
||||||
color_temp_kelvin: 2202
|
|
||||||
brightness: 100
|
|
||||||
light.server_lamp:
|
|
||||||
state: on
|
|
||||||
rgb_color: [255, 112, 86]
|
|
||||||
brightness: 175
|
|
||||||
- start: '10:00 pm'
|
|
||||||
scene:
|
|
||||||
light.bar:
|
|
||||||
state: on
|
|
||||||
color_temp_kelvin: 2202
|
|
||||||
brightness: 75
|
|
||||||
light.server_lamp:
|
|
||||||
state: on
|
|
||||||
rgb_color: [255, 112, 86]
|
|
||||||
brightness: 75
|
|
||||||
- start: '11:30 pm'
|
|
||||||
scene:
|
|
||||||
light.bar:
|
|
||||||
state: on
|
|
||||||
color_temp_kelvin: 2202
|
|
||||||
brightness: 30
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
from appdaemon.adapi import ADAPI
|
from appdaemon.plugins.hass import Hass
|
||||||
|
|
||||||
|
|
||||||
class HelloWorld(ADAPI):
|
class HelloWorld(Hass):
|
||||||
def initialize(self):
|
def initialize(self):
|
||||||
self.log("Hello from AppDaemon")
|
self.log('Hello from AppDaemon')
|
||||||
self.log("You are now ready to run Apps!")
|
self.log('You are now ready to run Apps!')
|
||||||
|
|
||||||
|
self.get_history('ball1')
|
||||||
|
|||||||
48
apps/stages/bar.yaml
Normal file
48
apps/stages/bar.yaml
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
bar_lights:
|
||||||
|
module: light
|
||||||
|
class: StagedLight
|
||||||
|
stages:
|
||||||
|
- start: '03:00 am'
|
||||||
|
scene:
|
||||||
|
light.bar:
|
||||||
|
state: on
|
||||||
|
color_temp_kelvin: 4500
|
||||||
|
brightness: 25
|
||||||
|
- start: '09:00 am'
|
||||||
|
scene:
|
||||||
|
light.bar:
|
||||||
|
state: on
|
||||||
|
color_temp_kelvin: 3500
|
||||||
|
brightness: 100
|
||||||
|
- start: '13:00'
|
||||||
|
scene:
|
||||||
|
light.bar:
|
||||||
|
state: on
|
||||||
|
color_temp_kelvin: 2500
|
||||||
|
brightness: 150
|
||||||
|
- start: 'sunset'
|
||||||
|
scene:
|
||||||
|
light.bar:
|
||||||
|
state: on
|
||||||
|
color_temp_kelvin: 2202
|
||||||
|
brightness: 100
|
||||||
|
light.server_lamp:
|
||||||
|
state: on
|
||||||
|
rgb_color: [255, 112, 86]
|
||||||
|
brightness: 175
|
||||||
|
- start: '10:00 pm'
|
||||||
|
scene:
|
||||||
|
light.bar:
|
||||||
|
state: on
|
||||||
|
color_temp_kelvin: 2202
|
||||||
|
brightness: 75
|
||||||
|
light.server_lamp:
|
||||||
|
state: on
|
||||||
|
rgb_color: [255, 112, 86]
|
||||||
|
brightness: 75
|
||||||
|
- start: '11:30 pm'
|
||||||
|
scene:
|
||||||
|
light.bar:
|
||||||
|
state: on
|
||||||
|
color_temp_kelvin: 2202
|
||||||
|
brightness: 30
|
||||||
@@ -6,7 +6,7 @@ from pydantic import PrivateAttr
|
|||||||
from pydantic import field_serializer
|
from pydantic import field_serializer
|
||||||
|
|
||||||
|
|
||||||
class EntityState(BaseModel):
|
class EntityState(BaseModel, extra='allow'):
|
||||||
state: bool = True
|
state: bool = True
|
||||||
color_temp_kelvin: int | None = None
|
color_temp_kelvin: int | None = None
|
||||||
rgb_color: list[int] | None = None
|
rgb_color: list[int] | None = None
|
||||||
44
apps/stages/upper_stairs.yaml
Normal file
44
apps/stages/upper_stairs.yaml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
upper_stairs:
|
||||||
|
module: light
|
||||||
|
class: StagedLight
|
||||||
|
stages:
|
||||||
|
- start: '04:00'
|
||||||
|
scene:
|
||||||
|
light.bathroom_stairs:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 4000
|
||||||
|
brightness: 30
|
||||||
|
light.spire:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 4000
|
||||||
|
brightness: 30
|
||||||
|
- start: '07:00'
|
||||||
|
scene:
|
||||||
|
light.bathroom_stairs:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 4000
|
||||||
|
brightness: 60
|
||||||
|
light.spire:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 4000
|
||||||
|
brightness: 60
|
||||||
|
- start: 'sunset'
|
||||||
|
scene:
|
||||||
|
light.bathroom_stairs:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 2202
|
||||||
|
brightness: 60
|
||||||
|
light.spire:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 2202
|
||||||
|
brightness: 60
|
||||||
|
- start: '11:00'
|
||||||
|
scene:
|
||||||
|
light.bathroom_stairs:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 2202
|
||||||
|
brightness: 40
|
||||||
|
light.spire:
|
||||||
|
state: "on"
|
||||||
|
color_temp_kelvin: 2202
|
||||||
|
brightness: 40
|
||||||
Reference in New Issue
Block a user