diff --git a/.gitignore b/.gitignore index 6b96934..40a3565 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ __pycache__ secrets.yaml .python-version -*.ipynb \ No newline at end of file +*.ipynb + +logs/ \ No newline at end of file diff --git a/apps/apps.yaml b/apps/apps.yaml index d036ae7..2d4cd92 100644 --- a/apps/apps.yaml +++ b/apps/apps.yaml @@ -2,6 +2,10 @@ hello_world: module: hello_world class: HelloWorld +rich_logging: + module: console + global: true + living_room_tv: module: tv class: SoundBar diff --git a/apps/room_control b/apps/room_control index 02726b0..fe0b305 160000 --- a/apps/room_control +++ b/apps/room_control @@ -1 +1 @@ -Subproject commit 02726b0766b3a7683607ed8643832f005f6348ec +Subproject commit fe0b3057ed778143f466fca7976813c2321e806d diff --git a/apps/rooms/bathroom.yaml b/apps/rooms/bathroom.yaml index 9809029..a4a9931 100644 --- a/apps/rooms/bathroom.yaml +++ b/apps/rooms/bathroom.yaml @@ -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 @@ -42,7 +46,9 @@ bathroom_button: bathroom_motion: module: motion - class: Motion + class: Motion + dependencies: + - bathroom # rich: DEBUG app: bathroom sensor: binary_sensor.bathroom_motion_occupancy diff --git a/apps/rooms/bedroom.yaml b/apps/rooms/bedroom.yaml index 897e254..3ed62fa 100644 --- a/apps/rooms/bedroom.yaml +++ b/apps/rooms/bedroom.yaml @@ -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 diff --git a/apps/rooms/closet.yaml b/apps/rooms/closet.yaml index 6087c32..2c3a704 100644 --- a/apps/rooms/closet.yaml +++ b/apps/rooms/closet.yaml @@ -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 diff --git a/apps/rooms/kitchen.yaml b/apps/rooms/kitchen.yaml index 6c50287..a1ae167 100755 --- a/apps/rooms/kitchen.yaml +++ b/apps/rooms/kitchen.yaml @@ -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 diff --git a/apps/rooms/laundry.yaml b/apps/rooms/laundry.yaml index 8f7aa4b..1963f77 100644 --- a/apps/rooms/laundry.yaml +++ b/apps/rooms/laundry.yaml @@ -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 diff --git a/apps/rooms/living_room.yaml b/apps/rooms/living_room.yaml index a2e24ea..453f256 100644 --- a/apps/rooms/living_room.yaml +++ b/apps/rooms/living_room.yaml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 7c91f4a..547e0a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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