mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
Refactor bed occupancy sensors and related automations
- Updated nursery automation to use input booleans for bed occupancy instead of binary sensors. - Changed conditions in nursery automation to improve readability and consistency. - Modified binary sensor configurations for master bedroom and nursery to use input booleans. - Removed unused input number configurations related to master bed load cells. - Updated UI configurations to reflect changes in entity types from binary sensors to input booleans. - Cleaned up camera view configurations and adjusted styles for better layout. - Removed deprecated master bed YAML configuration and archived it for future reference. - Enhanced ESPHome configurations for white and black beds, including improved logging and diagnostics.
This commit is contained in:
@@ -4,42 +4,42 @@ id: automation_nursery_into_bed
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:30'
|
||||
to: "on"
|
||||
for: "00:00:30"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
to: 'on'
|
||||
for: '00:00:30'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
to: "on"
|
||||
for: "00:00:30"
|
||||
|
||||
condition:
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id: input_select.nursery_mode
|
||||
state: 'Nightlight'
|
||||
state: "Nightlight"
|
||||
- condition: state
|
||||
entity_id: light.nursery_hue
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
action:
|
||||
- service: light.turn_on
|
||||
|
||||
@@ -1,73 +1,72 @@
|
||||
alias: 'Nursery Not Occupied'
|
||||
alias: "Nursery Not Occupied"
|
||||
id: automation_nursery_not_occupied
|
||||
mode: restart
|
||||
|
||||
trigger:
|
||||
- platform: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
from: "on"
|
||||
to: "off"
|
||||
|
||||
- platform: state
|
||||
entity_id:
|
||||
- input_boolean.home_occupied
|
||||
- binary_sensor.nursery_occupied
|
||||
to: 'off'
|
||||
for: '00:05:00'
|
||||
to: "off"
|
||||
for: "00:05:00"
|
||||
|
||||
# - platform: time_pattern
|
||||
# minutes: "/5"
|
||||
|
||||
condition:
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.lights_off_manually
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: state
|
||||
entity_id:
|
||||
- binary_sensor.white_bed_occupied
|
||||
- input_boolean.white_bed_occupied
|
||||
- binary_sensor.black_bed_occupied
|
||||
state:
|
||||
- 'off'
|
||||
- 'unavailable'
|
||||
- "off"
|
||||
- "unavailable"
|
||||
|
||||
- condition: state
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.nursery_person_occupancy
|
||||
state: 'off'
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
- condition: state
|
||||
entity_id: binary_sensor.nursery_occupied
|
||||
state: 'off'
|
||||
state: "off"
|
||||
for:
|
||||
minutes: 5
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'off'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: 'Manual'
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "off"
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
- conditions:
|
||||
- condition: not
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_select.house
|
||||
state: "Manual"
|
||||
sequence:
|
||||
- service: homeassistant.turn_off
|
||||
entity_id: input_boolean.nursery_occupied
|
||||
|
||||
@@ -10,78 +10,78 @@ trigger:
|
||||
|
||||
- platform: state
|
||||
entity_id: binary_sensor.black_bed_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for: '00:00:05'
|
||||
from: "on"
|
||||
to: "off"
|
||||
for: "00:00:05"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.white_bed_occupied
|
||||
from: 'on'
|
||||
to: 'off'
|
||||
for: '00:00:05'
|
||||
entity_id: input_boolean.white_bed_occupied
|
||||
from: "on"
|
||||
to: "off"
|
||||
for: "00:00:05"
|
||||
- platform: state
|
||||
entity_id: binary_sensor.nursery_door
|
||||
from: 'off'
|
||||
to: 'on'
|
||||
from: "off"
|
||||
to: "on"
|
||||
|
||||
condition:
|
||||
- alias: "Do we want to be alerted?"
|
||||
condition: state
|
||||
entity_id: input_boolean.out_of_bed_alert
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- alias: "Is the home occupied or in guest mode?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.home_occupied
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.guest_mode
|
||||
state: "on"
|
||||
|
||||
- alias: "Are any of the kids considered home?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: input_boolean.emmett_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.bridget_home
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: input_boolean.ebin_home
|
||||
state: "on"
|
||||
|
||||
- alias: "Is at a time of day when the kids should be sleeping?"
|
||||
condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.evening
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.night
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_morning
|
||||
state: 'on'
|
||||
- condition: state
|
||||
entity_id: binary_sensor.evening
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.late_evening
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.night
|
||||
state: "on"
|
||||
- condition: state
|
||||
entity_id: binary_sensor.early_morning
|
||||
state: "on"
|
||||
|
||||
- alias: "Is Nursery Light Cycle turned off?"
|
||||
condition: state
|
||||
entity_id: input_boolean.nursery_light_cycle
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
- alias: "Are the kids asleep?"
|
||||
condition: state
|
||||
entity_id: input_boolean.kids_asleep
|
||||
state: 'on'
|
||||
state: "on"
|
||||
|
||||
- alias: "Is an adult awake?"
|
||||
condition: state
|
||||
entity_id: binary_sensor.adults_asleep
|
||||
state: 'off'
|
||||
state: "off"
|
||||
|
||||
variables:
|
||||
computer_area: "{{ states('binary_sensor.computer_area_person_occupancy') }}"
|
||||
@@ -90,42 +90,42 @@ variables:
|
||||
|
||||
action:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: script.blink_garage_lights
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.garage_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: script.blink_garage_lights
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.computer_area_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.computer_area_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.computer_area_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_room_occupied
|
||||
state: 'on'
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: binary_sensor.front_room_occupied
|
||||
state: "on"
|
||||
sequence:
|
||||
- service: webrtc.dash_cast
|
||||
data:
|
||||
entity_id: media_player.front_room_hub
|
||||
url: rtsp_cam08_sub
|
||||
force: true
|
||||
extra:
|
||||
mode: webrtc
|
||||
|
||||
- delay: '00:10:00'
|
||||
- delay: "00:10:00"
|
||||
|
||||
- service: media_player.turn_off
|
||||
entity_id: media_player.front_room_hub, media_player.computer_area_hub
|
||||
|
||||
Reference in New Issue
Block a user