created stages dir

This commit is contained in:
John Lancaster
2025-11-21 21:54:54 -06:00
parent d6941f8c7c
commit 76027f6fc5
6 changed files with 102 additions and 58 deletions

View File

@@ -1,53 +1,3 @@
# hello_world:
# module: hello
# 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
hello-world:
module: hello
class: HelloWorld

View File

@@ -1,7 +1,9 @@
from appdaemon.adapi import ADAPI
from appdaemon.plugins.hass import Hass
class HelloWorld(ADAPI):
class HelloWorld(Hass):
def initialize(self):
self.log("Hello from AppDaemon")
self.log("You are now ready to run Apps!")
self.log('Hello from AppDaemon')
self.log('You are now ready to run Apps!')
self.get_history('ball1')

48
apps/stages/bar.yaml Normal file
View 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

View File

@@ -6,7 +6,7 @@ from pydantic import PrivateAttr
from pydantic import field_serializer
class EntityState(BaseModel):
class EntityState(BaseModel, extra='allow'):
state: bool = True
color_temp_kelvin: int | None = None
rgb_color: list[int] | None = None

View 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