mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 18:40:14 -04:00
Adding button for master bed occupied
This commit is contained in:
@@ -5,7 +5,7 @@ id: automation_clint_in_bed
|
|||||||
trigger:
|
trigger:
|
||||||
# Bed in master bedroom is occupied
|
# Bed in master bedroom is occupied
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'on'
|
to: 'on'
|
||||||
# Radio playing
|
# Radio playing
|
||||||
- platform: state
|
- platform: state
|
||||||
@@ -63,7 +63,7 @@ condition:
|
|||||||
|
|
||||||
- alias: "The bed is occupied"
|
- alias: "The bed is occupied"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'on'
|
state: 'on'
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ trigger:
|
|||||||
entity_id: media_player.great_room
|
entity_id: media_player.great_room
|
||||||
to: 'idle'
|
to: 'idle'
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'off'
|
to: 'off'
|
||||||
for: '00:05:00'
|
for: '00:05:00'
|
||||||
- platform: state
|
- platform: state
|
||||||
@@ -36,7 +36,7 @@ condition:
|
|||||||
after: '04:00:00'
|
after: '04:00:00'
|
||||||
before: '22:00:00'
|
before: '22:00:00'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'off'
|
state: 'off'
|
||||||
for: '00:01:00'
|
for: '00:01:00'
|
||||||
action:
|
action:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ trigger:
|
|||||||
entity_id: binary_sensor.morning
|
entity_id: binary_sensor.morning
|
||||||
to: 'on'
|
to: 'on'
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'on'
|
to: 'on'
|
||||||
|
|
||||||
condition:
|
condition:
|
||||||
@@ -16,7 +16,7 @@ condition:
|
|||||||
entity_id: input_boolean.clint_home
|
entity_id: input_boolean.clint_home
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'on'
|
state: 'on'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.morning
|
entity_id: binary_sensor.morning
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ id: automation_kristy_in_bed
|
|||||||
trigger:
|
trigger:
|
||||||
# Bed in master bedroom is occupied
|
# Bed in master bedroom is occupied
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'on'
|
to: 'on'
|
||||||
# Radio playing
|
# Radio playing
|
||||||
- platform: state
|
- platform: state
|
||||||
@@ -31,7 +31,7 @@ condition:
|
|||||||
|
|
||||||
- alias: "The bed is occupied"
|
- alias: "The bed is occupied"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'on'
|
state: 'on'
|
||||||
action:
|
action:
|
||||||
- service: input_boolean.turn_on
|
- service: input_boolean.turn_on
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ trigger:
|
|||||||
- input_boolean.clint_is_awake
|
- input_boolean.clint_is_awake
|
||||||
- input_boolean.kristy_in_bed
|
- input_boolean.kristy_in_bed
|
||||||
- input_boolean.kristy_is_awake
|
- input_boolean.kristy_is_awake
|
||||||
- binary_sensor.master_bed_occupied
|
- binary_sensor.master_bed_right_occupied
|
||||||
|
|
||||||
- platform: time
|
- platform: time
|
||||||
id: wake_clint
|
id: wake_clint
|
||||||
@@ -38,7 +38,7 @@ condition:
|
|||||||
- condition: trigger
|
- condition: trigger
|
||||||
id: wake_clint
|
id: wake_clint
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'off'
|
state: 'off'
|
||||||
for: '00:10:00'
|
for: '00:10:00'
|
||||||
- condition: and
|
- condition: and
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ condition:
|
|||||||
entity_id: input_boolean.computer_area_occupied
|
entity_id: input_boolean.computer_area_occupied
|
||||||
state: 'off'
|
state: 'off'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'off'
|
state: 'off'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.master_bedroom_occupied
|
entity_id: binary_sensor.master_bedroom_occupied
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ trigger:
|
|||||||
for: '00:00:30'
|
for: '00:00:30'
|
||||||
|
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'on'
|
to: 'on'
|
||||||
for: '00:00:05'
|
for: '00:00:05'
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ condition:
|
|||||||
entity_id: input_boolean.kristy_home
|
entity_id: input_boolean.kristy_home
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
|
||||||
- alias: "After 10:00PM and before 4:00AM"
|
- alias: "After 9:00PM and before 4:00AM"
|
||||||
condition: time
|
condition: time
|
||||||
after: '21:00:00'
|
after: '21:00:00'
|
||||||
before: '04:00:00'
|
before: '04:00:00'
|
||||||
@@ -40,7 +40,7 @@ condition:
|
|||||||
entity_id: sensor.pixel_7_charger_type
|
entity_id: sensor.pixel_7_charger_type
|
||||||
state: 'wireless'
|
state: 'wireless'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ id: automation_master_bedroom_awake
|
|||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'off'
|
to: 'off'
|
||||||
for: '00:10:00'
|
for: '00:10:00'
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ condition:
|
|||||||
|
|
||||||
- alias: "No one on master bed"
|
- alias: "No one on master bed"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
|
||||||
- alias: "The boolean is currently on"
|
- alias: "The boolean is currently on"
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ condition:
|
|||||||
state: 'off'
|
state: 'off'
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id:
|
entity_id:
|
||||||
- binary_sensor.master_bed_occupied
|
- binary_sensor.master_bed_right_occupied
|
||||||
state:
|
state:
|
||||||
- 'off'
|
- 'off'
|
||||||
- 'unavailable'
|
- 'unavailable'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ id: automation_master_bedroom_status
|
|||||||
trigger:
|
trigger:
|
||||||
- id: master_bed_not_occupied
|
- id: master_bed_not_occupied
|
||||||
platform: state
|
platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'off'
|
to: 'off'
|
||||||
for: '00:10:00'
|
for: '00:10:00'
|
||||||
|
|
||||||
@@ -19,9 +19,9 @@ trigger:
|
|||||||
to: 'on'
|
to: 'on'
|
||||||
for: '00:00:30'
|
for: '00:00:30'
|
||||||
|
|
||||||
- id: master_bed_occupied
|
- id: master_bed_right_occupied
|
||||||
platform: state
|
platform: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
to: 'on'
|
to: 'on'
|
||||||
for: '00:00:05'
|
for: '00:00:05'
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ condition:
|
|||||||
|
|
||||||
- alias: "No one on master bed"
|
- alias: "No one on master bed"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'off'
|
state: 'off'
|
||||||
|
|
||||||
- alias: "Is the room asleep?"
|
- alias: "Is the room asleep?"
|
||||||
@@ -77,12 +77,12 @@ condition:
|
|||||||
|
|
||||||
- alias: "After 10:00PM and before 4:00AM"
|
- alias: "After 10:00PM and before 4:00AM"
|
||||||
condition: time
|
condition: time
|
||||||
after: '22:00:00'
|
after: '21:00:00'
|
||||||
before: '04:00:00'
|
before: '04:00:00'
|
||||||
|
|
||||||
- alias: "Someone on master bed"
|
- alias: "Someone on master bed"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'on'
|
state: 'on'
|
||||||
|
|
||||||
action:
|
action:
|
||||||
@@ -105,12 +105,12 @@ action:
|
|||||||
|
|
||||||
- alias: "It is before 10:00PM and after 4:00AM"
|
- alias: "It is before 10:00PM and after 4:00AM"
|
||||||
condition: time
|
condition: time
|
||||||
before: '22:00:00'
|
before: '21:00:00'
|
||||||
after: '04:00:00'
|
after: '04:00:00'
|
||||||
|
|
||||||
- alias: "No one on master bed"
|
- alias: "No one on master bed"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'off'
|
state: 'off'
|
||||||
sequence:
|
sequence:
|
||||||
- service: input_boolean.turn_off
|
- service: input_boolean.turn_off
|
||||||
@@ -134,12 +134,12 @@ action:
|
|||||||
|
|
||||||
- alias: "After 10:00PM and before 4:00AM"
|
- alias: "After 10:00PM and before 4:00AM"
|
||||||
condition: time
|
condition: time
|
||||||
after: '22:00:00'
|
after: '21:00:00'
|
||||||
before: '04:00:00'
|
before: '04:00:00'
|
||||||
|
|
||||||
- alias: "Someone on master bed"
|
- alias: "Someone on master bed"
|
||||||
condition: state
|
condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: 'on'
|
state: 'on'
|
||||||
sequence:
|
sequence:
|
||||||
- choose:
|
- choose:
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ action:
|
|||||||
# option: 'Off'
|
# option: 'Off'
|
||||||
- service: media_player.volume_set
|
- service: media_player.volume_set
|
||||||
data:
|
data:
|
||||||
volume_level: 0.3
|
volume_level: 0.4
|
||||||
target:
|
target:
|
||||||
entity_id: media_player.master_bedroom_clock
|
entity_id: media_player.master_bedroom_clock
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ prior: 0.25
|
|||||||
probability_threshold: 0.75
|
probability_threshold: 0.75
|
||||||
observations:
|
observations:
|
||||||
|
|
||||||
- entity_id: binary_sensor.master_bed_occupied
|
- entity_id: binary_sensor.master_bed_right_occupied
|
||||||
platform: state
|
platform: state
|
||||||
prob_given_true: .83
|
prob_given_true: .83
|
||||||
prob_given_false: 0.0
|
prob_given_false: 0.0
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ sensors:
|
|||||||
unique_id: templatebinarysensor.master_bed_right_occupied
|
unique_id: templatebinarysensor.master_bed_right_occupied
|
||||||
friendly_name: Master Bedroom Right Occupied
|
friendly_name: Master Bedroom Right Occupied
|
||||||
icon_template: mdi:bed-king
|
icon_template: mdi:bed-king
|
||||||
value_template: "{{ is_state('binary_sensor.master_bed_occupied','on') }}"
|
value_template: "{{ is_state('binary_sensor.master_bed_occupied','on') or is_state('input_boolean.master_bed_occupied','on') }}"
|
||||||
|
|
||||||
bathroom_getting_humid:
|
bathroom_getting_humid:
|
||||||
unique_id: templatebinarysensor.bathroom_getting_humid
|
unique_id: templatebinarysensor.bathroom_getting_humid
|
||||||
|
|||||||
@@ -112,11 +112,11 @@ cards:
|
|||||||
- type: horizontal-stack
|
- type: horizontal-stack
|
||||||
cards:
|
cards:
|
||||||
- type: custom:mushroom-template-card
|
- type: custom:mushroom-template-card
|
||||||
entity: binary_sensor.master_bed_occupied
|
entity: binary_sensor.master_bed_right_occupied
|
||||||
icon: mdi:bed-king
|
icon: mdi:bed-king
|
||||||
icon_color: >-
|
icon_color: >-
|
||||||
{{
|
{{
|
||||||
iif(is_state('binary_sensor.master_bed_occupied','on'),'yellow')}}
|
iif(is_state('binary_sensor.master_bed_right_occupied','on'),'yellow')}}
|
||||||
primary: Bed
|
primary: Bed
|
||||||
double_tap_action:
|
double_tap_action:
|
||||||
action: call-service
|
action: call-service
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ cameras:
|
|||||||
occupancy: false
|
occupancy: false
|
||||||
motion: false
|
motion: false
|
||||||
entities:
|
entities:
|
||||||
- binary_sensor.master_bed_occupied
|
- binary_sensor.master_bed_right_occupied
|
||||||
timeline:
|
timeline:
|
||||||
media: snapshots
|
media: snapshots
|
||||||
show_recordings: false
|
show_recordings: false
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ elements:
|
|||||||
#button #3
|
#button #3
|
||||||
- type: "custom:button-card"
|
- type: "custom:button-card"
|
||||||
color: auto
|
color: auto
|
||||||
entity: binary_sensor.master_bed_occupied
|
entity: binary_sensor.master_bed_right_occupied
|
||||||
show_name: false
|
show_name: false
|
||||||
style:
|
style:
|
||||||
left: 50%
|
left: 50%
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ cameras:
|
|||||||
title: MBR Left
|
title: MBR Left
|
||||||
id: mbr_left
|
id: mbr_left
|
||||||
live:
|
live:
|
||||||
auto_mute: all
|
|
||||||
layout:
|
layout:
|
||||||
fit: fill
|
fit: fill
|
||||||
preload: true
|
preload: true
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ cameras:
|
|||||||
title: MBR Right
|
title: MBR Right
|
||||||
id: mbr_right
|
id: mbr_right
|
||||||
live:
|
live:
|
||||||
auto_mute: all
|
|
||||||
layout:
|
layout:
|
||||||
fit: fill
|
fit: fill
|
||||||
preload: true
|
preload: true
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ sequence:
|
|||||||
- repeat:
|
- repeat:
|
||||||
while:
|
while:
|
||||||
- condition: state
|
- condition: state
|
||||||
entity_id: binary_sensor.master_bed_occupied
|
entity_id: binary_sensor.master_bed_right_occupied
|
||||||
state: "on"
|
state: "on"
|
||||||
sequence:
|
sequence:
|
||||||
- variables:
|
- variables:
|
||||||
|
|||||||
Reference in New Issue
Block a user