most apps switched to controller model

This commit is contained in:
John Lancaster
2023-04-18 10:11:39 -05:00
parent 35a4a3fd0e
commit e5d3b31e4b
6 changed files with 211 additions and 105 deletions

51
apps/bathroom.yaml Normal file
View File

@@ -0,0 +1,51 @@
bathroom:
module: controller
class: ControllerRoomLights
entities:
- light.bathroom
bathroom_motion:
module: controller
class: ControllerMotion
room: bathroom
off_duration: 00:03:00
entities:
- binary_sensor.motion_bathroom
bathroom_button:
module: controller
class: ControllerButton
room: bathroom
buttons:
- kitchen
bathroom_daylight:
module: controller
class: ControllerDaylight
room: bathroom
entities:
- light.bathroom
latitude: 30.150380
longitude: -97.4487
periods:
- time: '04:00:00am'
brightness: 40
color_temp: 350
- elevation: 0
direction: rising
brightness: 150
color_temp: 200
- time: noon
brightness: 255
color_temp: 300
- elevation: 0
direction: setting
brightness: 125
color_temp: 325
- time: '10:30:00pm'
brightness: 40
color_temp: 350

54
apps/bedroom.yaml Normal file
View File

@@ -0,0 +1,54 @@
bedroom:
module: controller
class: ControllerRoomLights
sleep: input_boolean.sleeping
entities:
- light.bedroom
- light.overhead
bedroom_motion:
module: controller
class: ControllerMotion
room: bedroom
off_duration: 00:05:00
entities:
- binary_sensor.motion_bedroom
bedroom_button:
module: controller
class: ControllerButton
room: bedroom
buttons:
- bedroom
- bedroom2
bedroom_daylight:
module: controller
class: ControllerDaylight
room: bedroom
entities:
- light.bedroom
latitude: 30.150380
longitude: -97.4487
periods:
- time: '04:00:00am'
brightness: 75
color_temp: 200
- elevation: 0
direction: rising
brightness: 150
color_temp: 200
- time: noon
brightness: 255
color_temp: 300
- elevation: 0
direction: setting
brightness: 125
color_temp: 325
- time: '10:30:00pm'
brightness: 75
color_temp: 350

View File

@@ -22,29 +22,21 @@ kitchen_button:
kitchen_daylight: kitchen_daylight:
module: controller module: controller
class: ControllerDaylight class: ControllerDaylight
room: kitchen
entities: entities:
- light.kitchen - light.kitchen
latitude: 30.150380 latitude: 30.150380
longitude: -97.4487 longitude: -97.4487
periods: periods:
- time: '04:00:00am' - time: sunrise
brightness: 75 brightness: 10
color_temp: 200 color_temp: 200
- elevation: 0
direction: rising
brightness: 150
color_temp: 200
- time: noon - time: noon
brightness: 255 brightness: 30
color_temp: 300 color_temp: 300
- time: sunset
- elevation: 0 brightness: 40
direction: setting color_temp: 450
brightness: 125 - time: '10:00:00pm'
color_temp: 325 brightness: 10
color_temp: 650
- time: '10:30:00pm'
brightness: 75
color_temp: 350

View File

@@ -25,6 +25,7 @@ living_room_button:
living_room_daylight: living_room_daylight:
module: controller module: controller
class: ControllerDaylight class: ControllerDaylight
room: living_room
entities: entities:
- light.living_room - light.living_room
latitude: 30.150380 latitude: 30.150380
@@ -32,7 +33,7 @@ living_room_daylight:
periods: periods:
- time: '04:00:00am' - time: '04:00:00am'
brightness: 75 brightness: 75
color_temp: 200 color_temp: 375
- elevation: 0 - elevation: 0
direction: rising direction: rising
@@ -60,16 +61,20 @@ living_room_daylight:
- time: '10:30:00pm' - time: '10:30:00pm'
brightness: 75 brightness: 75
color_temp: 400 color_temp: 375
couch_corner_daylight: couch_corner_daylight:
module: controller module: controller
class: ControllerDaylight class: ControllerDaylight
room: living_room
entities: entities:
- light.couch_corner - light.couch_corner
latitude: 30.150380 latitude: 30.150380
longitude: -97.4487 longitude: -97.4487
periods: periods:
- time: '04:00:00am'
brightness: 10
color_temp: 500
- time: sunrise - time: sunrise
brightness: 20 brightness: 20
color_temp: 200 color_temp: 200
@@ -79,6 +84,10 @@ couch_corner_daylight:
- time: sunset - time: sunset
brightness: 20 brightness: 20
color_temp: 400 color_temp: 400
- time: '10:30:00pm'
brightness: 10
color_temp: 500
# scene: # scene:
# - time: sunrise # - time: sunrise

View File

@@ -1,38 +1,38 @@
bathroom: # bathroom:
module: basic_motion # module: basic_motion
class: MotionLight # class: MotionLight
entity: light.bathroom # entity: light.bathroom
sensor: binary_sensor.motion_bathroom # sensor: binary_sensor.motion_bathroom
off_duration: '00:05:00' # off_duration: '00:05:00'
button: button1 # button: button1
delay: '00:20:00' # delay: '00:20:00'
scene: # scene:
- time: '05:00:00' # - time: '05:00:00'
scene: # scene:
light.bathroom: # light.bathroom:
brightness_pct: 40 # brightness_pct: 40
color_temp: 250 # color_temp: 250
- time: '12:00:00' # - time: '12:00:00'
scene: # scene:
light.bathroom: # light.bathroom:
brightness_pct: 70 # brightness_pct: 70
color_temp: 300 # color_temp: 300
- time: sunset # - time: sunset
scene: # scene:
light.bathroom: # light.bathroom:
brightness_pct: 50 # brightness_pct: 50
color_temp: 350 # color_temp: 350
- time: '23:00:00' # - time: '23:00:00'
scene: # scene:
light.bathroom: # light.bathroom:
brightness_pct: 20 # brightness_pct: 20
color_temp: 350 # color_temp: 350
sleep: input_boolean.sleeping # sleep: input_boolean.sleeping
sleep_scene: # sleep_scene:
off_duration: '00:02:00' # off_duration: '00:02:00'
light.bathroom: # light.bathroom:
brightness_pct: 10 # brightness_pct: 10
color_temp: 250 # color_temp: 250
closet: closet:
module: basic_motion module: basic_motion
@@ -62,55 +62,55 @@ closet:
brightness_pct: 40 brightness_pct: 40
color_temp: 400 color_temp: 400
bedroom: # bedroom:
module: basic_motion # module: basic_motion
class: MotionLight # class: MotionLight
entity: light.bedroom # entity: light.bedroom
sensor: binary_sensor.motion_bedroom # sensor: binary_sensor.motion_bedroom
off_duration: '00:05:00' # off_duration: '00:05:00'
button: # button:
- bedroom_switch # - bedroom
- bedroom_switch_2 # - bedroom2
scene: # scene:
- time: 'sunrise - 03:00:00' # - time: 'sunrise - 03:00:00'
scene: # scene:
light.bedroom: # light.bedroom:
state: on # state: on
color_temp: 550 # color_temp: 550
brightness_pct: 20 # brightness_pct: 20
light.overhead: # light.overhead:
state: off # state: off
- time: '06:00:00' # - time: '06:00:00'
scene: # scene:
light.bedroom: # light.bedroom:
state: on # state: on
color_temp: 550 # color_temp: 550
brightness_pct: 20 # brightness_pct: 20
light.overhead: # light.overhead:
state: on # state: on
color_temp: 250 # color_temp: 250
brightness_pct: 15 # brightness_pct: 15
- time: '12:00:00' # - time: '12:00:00'
scene: # scene:
light.bedroom: # light.bedroom:
state: on # state: on
color_temp: 325 # color_temp: 325
brightness_pct: 30 # brightness_pct: 30
light.overhead: # light.overhead:
state: on # state: on
color_temp: 325 # color_temp: 325
brightness_pct: 70 # brightness_pct: 70
- time: 'sunset' # - time: 'sunset'
scene: # scene:
light.bedroom: # light.bedroom:
state: on # state: on
color_temp: 325 # color_temp: 325
brightness_pct: 50 # brightness_pct: 50
light.overhead: # light.overhead:
state: on # state: on
color_temp: 350 # color_temp: 350
brightness_pct: 10 # brightness_pct: 10
sleep: input_boolean.sleeping # sleep: input_boolean.sleeping
# living_room: # living_room:
# module: basic_motion # module: basic_motion

View File

@@ -13,4 +13,4 @@ sleep:
- light.patio - light.patio
- light.closet - light.closet
- light.kitchen - light.kitchen
- light.corner_light - light.couch_corner