Compare commits
2 Commits
fbd60ab6ac
...
61d5d99dee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61d5d99dee | ||
|
|
29759692b2 |
@@ -39,13 +39,25 @@ bar_lights:
|
||||
- start: 'sunset'
|
||||
scene:
|
||||
light.bar:
|
||||
state: on
|
||||
state: "on"
|
||||
color_temp_kelvin: 2202
|
||||
brightness: 100
|
||||
light.server_lamp:
|
||||
state: on
|
||||
rgb_color: [255, 112, 86]
|
||||
state: "on"
|
||||
rgb_color:
|
||||
- 255
|
||||
- 112
|
||||
- 86
|
||||
brightness: 175
|
||||
light.h6076:
|
||||
state: "on"
|
||||
brightness: 50
|
||||
effect: sunset
|
||||
- start: 'sunset + 1:00'
|
||||
scene:
|
||||
light.h6076:
|
||||
state: on
|
||||
brightness: 255
|
||||
- start: '10:00 pm'
|
||||
scene:
|
||||
light.bar:
|
||||
@@ -56,6 +68,9 @@ bar_lights:
|
||||
state: on
|
||||
rgb_color: [255, 112, 86]
|
||||
brightness: 75
|
||||
light.h6076:
|
||||
state: "on"
|
||||
brightness: 175
|
||||
- start: '11:30 pm'
|
||||
scene:
|
||||
light.bar:
|
||||
|
||||
@@ -69,15 +69,15 @@ class StagedLight(Hass):
|
||||
|
||||
### Transitions
|
||||
|
||||
def schedule_transition_checks(self, **kwargs: Any):
|
||||
def schedule_transition_checks(self, **_):
|
||||
now = self.get_now()
|
||||
for stage in self._stages:
|
||||
dt = self.parse_datetime(stage.start, aware=True, today=True)
|
||||
if dt > now:
|
||||
self.log(f'Scehduling transition at: {dt.isoformat()}', level='DEBUG')
|
||||
self.log(f'Scehduling transition at: {dt.strftime("%I:%M %p")}', level='DEBUG')
|
||||
self.run_at(self._check_transition, start=dt)
|
||||
|
||||
def _check_transition(self, **kwargs: Any):
|
||||
def _check_transition(self, **_):
|
||||
self.log('Firing transition event', level='DEBUG')
|
||||
self.fire_event(
|
||||
'stage_control',
|
||||
|
||||
Reference in New Issue
Block a user