Compare commits
2 Commits
63386406ce
...
4756d1669a
| Author | SHA1 | Date | |
|---|---|---|---|
| 4756d1669a | |||
| b4cbe014c2 |
21
apps/global/sleep.yaml
Normal file
21
apps/global/sleep.yaml
Normal file
@@ -0,0 +1,21 @@
|
||||
sleep_sensors:
|
||||
module: virtualsensors
|
||||
class: VirtualSensorsApp
|
||||
priority: 5 # default priority app is 50, since most of them require sensors created by virtual sensors, it's important that virtual_sensors start first
|
||||
|
||||
sensors:
|
||||
binary_sensor.is_bedroom_sleeping: input_boolean.bedroom_sleeping
|
||||
binary_sensor.is_living_room_sleeping: input_boolean.living_room_sleeping
|
||||
binary_sensor.is_desk_sleeping: input_boolean.desk_sleeping
|
||||
binary_sensor.is_guestroom_sleeping: input_boolean.guestroom_sleeping
|
||||
|
||||
binary_sensor.is_everybody_sleeping:
|
||||
- binary_sensor.is_bedroom_sleeping
|
||||
#- binary_sensor.is_living_room_sleeping and ...
|
||||
#- binary_sensor.is_desk_sleeping and ...
|
||||
#- binary_sensor.is_guestroom_sleeping and ...
|
||||
binary_sensor.is_anybody_sleeping:
|
||||
- binary_sensor.is_bedroom_sleeping
|
||||
- binary_sensor.is_living_room_sleeping
|
||||
- binary_sensor.is_desk_sleeping
|
||||
- binary_sensor.is_guestroom_sleeping
|
||||
@@ -7,10 +7,10 @@ virtual_events:
|
||||
virtual_events:
|
||||
good_morning:
|
||||
event_name: good_morning
|
||||
event_condition: not input_boolean.sleeping
|
||||
event_condition: not binary_sensor.is_everybody_sleeping
|
||||
|
||||
turn_off_all_lights:
|
||||
event_name: turn_off_all_lights
|
||||
event_condition: input_boolean.sleeping
|
||||
event_condition: binary_sensor.is_everybody_sleeping
|
||||
|
||||
|
||||
|
||||
@@ -10,5 +10,4 @@ virtual_sensors:
|
||||
|
||||
binary_sensor.is_apple_tv_on: media_player.apple_tv != 'off'
|
||||
binary_sensor.someone_home: person.maeva == 'home' or person.pierre == 'home'
|
||||
binary_sensor.is_everybody_sleeping: input_boolean.sleeping
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ sleep_switch:
|
||||
module: smartswitch
|
||||
class: SmartSwitch
|
||||
|
||||
entity: input_boolean.sleeping
|
||||
entity: input_boolean.bedroom_sleeping
|
||||
|
||||
toggle_events:
|
||||
button_long_press_pierre:
|
||||
@@ -64,7 +64,7 @@ sonos_led:
|
||||
|
||||
entity: switch.bedroom_led
|
||||
|
||||
smart_conditions: not input_boolean.sleeping
|
||||
smart_conditions: not binary_sensor.is_bedroom_sleeping
|
||||
|
||||
light_bedroom_bedlight_pierre:
|
||||
module: smartlight
|
||||
@@ -152,7 +152,7 @@ bed_ledstrip:
|
||||
entity: light.bedroom_ledstripe
|
||||
|
||||
smart_conditions:
|
||||
trigger_conditions: (input_boolean.sleeping or binary_sensor.day_interval_night) and (binary_sensor.bedroom_motion_bed_pierre or binary_sensor.bedroom_motion_bed_maeva)
|
||||
trigger_conditions: (binary_sensor.is_bedroom_sleeping or binary_sensor.day_interval_night) and (binary_sensor.bedroom_motion_bed_pierre or binary_sensor.bedroom_motion_bed_maeva)
|
||||
blocking_conditions: switch.bedroom_light or light.bedroom_bedlight_pierre or light.bedroom_bedlight_maeva
|
||||
|
||||
on_events_with_transition:
|
||||
@@ -177,4 +177,4 @@ alarm_clock:
|
||||
inputdate_alarmclock_secondary: input_datetime.secondary_alarmclock
|
||||
input_text_wakeup_time: input_text.wakeup_time
|
||||
|
||||
sleeping_condition: input_boolean.sleeping
|
||||
sleeping_condition: binary_sensor.is_bedroom_sleeping
|
||||
@@ -8,7 +8,7 @@ light_corridor:
|
||||
blocking_conditions: sensor.corridor_motion_light_level > 10 and not self
|
||||
|
||||
light_brightness_pct:
|
||||
1: input_boolean.sleeping
|
||||
1: binary_sensor.is_everybody_sleeping
|
||||
25: binary_sensor.day_interval_night
|
||||
100: True
|
||||
|
||||
@@ -22,7 +22,7 @@ light_hallway:
|
||||
blocking_conditions: sensor.hallway_motion_light_level > 10 and not self
|
||||
|
||||
light_brightness_pct:
|
||||
1: input_boolean.sleeping
|
||||
1: binary_sensor.is_everybody_sleeping
|
||||
25: binary_sensor.day_interval_night
|
||||
100: True
|
||||
|
||||
@@ -37,7 +37,7 @@ light_restroom:
|
||||
blocking_conditions: sensor.restroom_motion_light_level > 10 and not self
|
||||
|
||||
light_brightness_pct:
|
||||
1: input_boolean.sleeping
|
||||
1: binary_sensor.is_everybody_sleeping
|
||||
25: binary_sensor.day_interval_night
|
||||
100: True
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ light_kitchen_sink:
|
||||
|
||||
light_brightness_pct:
|
||||
100: light.kitchen_sink_switch
|
||||
1: binary_sensor.day_interval_night or input_boolean.sleeping
|
||||
1: binary_sensor.day_interval_night or binary_sensor.is_everybody_sleeping
|
||||
15: True
|
||||
|
||||
light_kitchen_sink_switch:
|
||||
|
||||
@@ -8,7 +8,7 @@ light_mezzanine_01:
|
||||
blocking_conditions: sensor.mezzanine_motion_light_level > 10 and not self
|
||||
|
||||
light_brightness_pct:
|
||||
15: input_boolean.sleeping
|
||||
15: binary_sensor.is_everybody_sleeping
|
||||
35: binary_sensor.day_interval_night
|
||||
100: True
|
||||
|
||||
@@ -22,7 +22,7 @@ light_mezzanine_02:
|
||||
blocking_conditions: sensor.mezzanine_motion_light_level > 10 and not self
|
||||
|
||||
light_brightness_pct:
|
||||
5: input_boolean.sleeping
|
||||
5: binary_sensor.is_everybody_sleeping
|
||||
25: binary_sensor.day_interval_night
|
||||
100: True
|
||||
|
||||
@@ -38,7 +38,7 @@ light_bookshelves:
|
||||
- binary_sensor.is_apple_tv_on and not binary_sensor.is_apple_tv_idle
|
||||
|
||||
#light_brightness_pct:
|
||||
# 5: input_boolean.sleeping
|
||||
# 5: binary_sensor.is_everybody_sleeping
|
||||
# 25: binary_sensor.day_interval_night
|
||||
# 100: True
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
|
||||
DEST=$ARCHIVE_DIR/$TIMESTAMP
|
||||
|
||||
# Find log files directly in the logs directory (non-recursive, skip archive subdir)
|
||||
LOG_FILES=$(find "$LOGS_DIR" -maxdepth 1 -type f -name "*.log")
|
||||
LOG_FILES=$(find "$LOGS_DIR" -maxdepth 1 -type f -name "*.log*")
|
||||
|
||||
if [ -z "$LOG_FILES" ]; then
|
||||
echo "[archiveLogs] No log files to archive."
|
||||
|
||||
@@ -2,3 +2,5 @@ libstdc++
|
||||
gcompat
|
||||
bash
|
||||
git
|
||||
nodejs
|
||||
npm
|
||||
Reference in New Issue
Block a user