set up dependencies and rich logging

This commit is contained in:
John Lancaster
2024-04-29 23:41:19 -05:00
parent 4bf09a677b
commit c4c4364225
10 changed files with 50 additions and 3 deletions

2
.gitignore vendored
View File

@@ -6,3 +6,5 @@ secrets.yaml
.python-version
*.ipynb
logs/

View File

@@ -2,6 +2,10 @@ hello_world:
module: hello_world
class: HelloWorld
rich_logging:
module: console
global: true
living_room_tv:
module: tv
class: SoundBar

View File

@@ -1,6 +1,8 @@
bathroom:
module: room_control
class: RoomController
dependencies:
- rich_logging
# rich: DEBUG
off_duration: '00:05:00'
states:
@@ -35,6 +37,8 @@ bathroom:
bathroom_button:
module: button
class: Button
dependencies:
- bathroom
# rich: DEBUG
app: bathroom
button: Bathroom Button
@@ -43,6 +47,8 @@ bathroom_button:
bathroom_motion:
module: motion
class: Motion
dependencies:
- bathroom
# rich: DEBUG
app: bathroom
sensor: binary_sensor.bathroom_motion_occupancy

View File

@@ -1,6 +1,8 @@
bedroom:
module: room_control
class: RoomController
dependencies:
- rich_logging
# rich: DEBUG
off_duration: '00:05:00'
states:
@@ -77,6 +79,8 @@ bedroom:
bedroom_buttons:
module: button
class: Button
dependencies:
- bedroom
# rich: DEBUG
app: bedroom
ref_entity: light.bedroom
@@ -87,6 +91,8 @@ bedroom_buttons:
bedroom_motion:
module: motion
class: Motion
dependencies:
- bedroom
# rich: DEBUG
app: bedroom
sensor: binary_sensor.bedroom_motion_occupancy

View File

@@ -1,6 +1,8 @@
closet:
module: room_control
class: RoomController
dependencies:
- rich_logging
# rich: DEBUG
off_duration: '00:02:00'
states:
@@ -28,6 +30,8 @@ closet:
closet_motion:
module: motion
class: Motion
dependencies:
- closet
# rich: DEBUG
app: closet
sensor: binary_sensor.closet_motion_occupancy

View File

@@ -1,6 +1,8 @@
kitchen:
module: room_control
class: RoomController
dependencies:
- rich_logging
# rich: DEBUG
off_duration: '00:10:00'
# ha_button: input_button.activate_kitchen
@@ -40,6 +42,8 @@ kitchen:
kitchen_button:
module: button
class: Button
dependencies:
- kitchen
# rich: DEBUG
app: kitchen
button: Kitchen Button
@@ -48,6 +52,8 @@ kitchen_button:
kitchen_motion:
module: motion
class: Motion
dependencies:
- kitchen
# rich: DEBUG
app: kitchen
sensor: binary_sensor.kitchen_motion_occupancy

View File

@@ -1,6 +1,8 @@
laundry:
module: room_control
class: RoomController
dependencies:
- rich_logging
# rich: DEBUG
off_duration: '00:02:00'
states:
@@ -28,6 +30,8 @@ laundry:
laundry_motion:
module: motion
class: Motion
dependencies:
- laundry
# rich: DEBUG
rich: DEBUG
app: laundry

View File

@@ -1,6 +1,8 @@
living_room:
module: room_control
class: RoomController
dependencies:
- rich_logging
# rich: DEBUG
off_duration: 00:30:00
states:
@@ -69,6 +71,8 @@ living_room:
front_door:
module: door
class: Door
dependencies:
- living_room
# rich: DEBUG
app: living_room
door: binary_sensor.front_contact
@@ -76,6 +80,8 @@ front_door:
living_room_button:
module: button
class: Button
dependencies:
- living_room
# rich: DEBUG
app: living_room
button: Living Room Button
@@ -84,6 +90,8 @@ living_room_button:
living_room_motion:
module: motion
class: Motion
dependencies:
- living_room
# rich: DEBUG
app: living_room
sensor: binary_sensor.living_room_motion_occupancy

View File

@@ -9,6 +9,7 @@ services:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- config:/conf:ro
- logs:/logs
ports:
- 5050:5050
restart: unless-stopped
@@ -22,3 +23,9 @@ volumes:
o: bind
type: none
device: ./
logs:
driver: local
driver_opts:
o: bind
type: none
device: ./logs