Hopefully fixing master bed presence and cleaning up a lot of junk

This commit is contained in:
CeeWeasel
2025-07-24 16:39:36 -04:00
parent ca1082899b
commit c80842714f
48 changed files with 1740 additions and 2042 deletions
+4 -3
View File
@@ -89,6 +89,7 @@ condition:
- condition: state
entity_id: binary_sensor.warmer_outside
state: "on"
action:
- service: homeassistant.turn_on
entity_id: switch.thermostat_fan_mode
actions:
- action: homeassistant.turn_on
target:
entity_id: switch.thermostat_fan_mode
@@ -33,10 +33,6 @@ condition:
- "{{ not zones|length or zones|select('in', entered_zones)|list|length > 0 }}"
- "{{ not labels|length or object in labels }}"
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
- '{{ is_state("binary_sensor.garage_door","off") }}'
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
- '{{ is_state("binary_sensor.outer_garage_door_contact","off")}}'
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
- "{{ is_state('input_boolean.outdoor_snapshots','on') }}"
action:
@@ -34,7 +34,7 @@ condition:
- "{{ not labels|length or object in labels }}"
#- "{{ not presence_entity or not is_state(presence_entity, 'home') }}"
- '{{ is_state("binary_sensor.garage_door","off") }}'
- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
#- '{{ is_state("binary_sensor.outer_garage_door","off") }}'
- '{{ is_state("binary_sensor.outer_garage_door_contact","off")}}'
- '{{ is_state("binary_sensor.front_door_contact","off") }}'
- '{{ is_state("binary_sensor.patio_door_contact","off") }}'
-5
View File
@@ -21,11 +21,6 @@ trigger:
from: 'off'
to: 'on'
- platform: state
id: car_home
entity_id:
- device_tracker.chevrolet_traverse_location
to: 'home'
- platform: homeassistant
event: start
+1 -1
View File
@@ -5,7 +5,7 @@ id: automation_clint_in_bed
trigger:
# Bed in master bedroom is occupied
- platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
to: 'on'
# Radio playing
- platform: state
+2 -2
View File
@@ -10,7 +10,7 @@ trigger:
entity_id: media_player.great_room
to: 'idle'
- platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
to: 'off'
for: '00:05:00'
- platform: state
@@ -36,7 +36,7 @@ condition:
after: '04:00:00'
before: '22:00:00'
- condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
state: 'off'
for: '00:01:00'
action:
+2 -2
View File
@@ -8,7 +8,7 @@ trigger:
entity_id: binary_sensor.morning
to: 'on'
- platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
to: 'on'
condition:
@@ -16,7 +16,7 @@ condition:
entity_id: input_boolean.clint_home
state: 'on'
- condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
state: 'on'
- condition: state
entity_id: binary_sensor.morning
+2 -2
View File
@@ -4,7 +4,7 @@ id: automation_kristy_in_bed
trigger:
# Bed in master bedroom is occupied
- platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_left
to: 'on'
# Radio playing
- platform: state
@@ -31,7 +31,7 @@ condition:
- alias: "The bed is occupied"
condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_left
state: 'on'
action:
- service: input_boolean.turn_on
+2 -2
View File
@@ -11,7 +11,7 @@ trigger:
- input_boolean.clint_is_awake
- input_boolean.kristy_in_bed
- input_boolean.kristy_is_awake
- input_boolean.master_bed_occupied
- binary_sensor.bed_presence_c175a4_bed_occupied_either
- platform: time
id: wake_clint
@@ -38,7 +38,7 @@ condition:
- condition: trigger
id: wake_clint
- condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: 'off'
for: '00:10:00'
- condition: and
+4 -2
View File
@@ -2,8 +2,10 @@ alias: "Almost Bedtime"
id: automation_almost_bedtime
initial_state: on
trigger:
platform: time
at: input_datetime.kids_five_minute_warning_time
trigger: time
at:
entity_id: input_datetime.kids_bedtime_announcement_time
offset: "-300"
condition:
- condition: state
entity_id: input_boolean.announce_bedtime
+6 -6
View File
@@ -9,9 +9,9 @@ trigger:
- platform: state
entity_id: binary_sensor.garage_door
to: 'on'
- platform: state
entity_id: binary_sensor.outer_garage_door
to: 'on'
# - platform: state
# entity_id: binary_sensor.outer_garage_door
# to: 'on'
- platform: state
entity_id: binary_sensor.outer_garage_door_contact
to: 'on'
@@ -50,9 +50,9 @@ condition:
- condition: state
entity_id: binary_sensor.garage_door
state: 'on'
- condition: state
entity_id: binary_sensor.outer_garage_door
state: 'on'
# - condition: state
# entity_id: binary_sensor.outer_garage_door
# state: 'on'
- condition: state
entity_id: binary_sensor.outer_garage_door_contact
state: 'on'
@@ -4,30 +4,30 @@ mode: single
# Hide warnings when triggered while in delay.
max_exceeded: silent
trigger:
- platform: state
triggers:
- trigger: state
id: "mode_change"
entity_id:
- input_select.entryway_mode
- input_select.automatic_light_profile
- platform: state
- trigger: state
id: light_level
entity_id: binary_sensor.entryway_naturally_lit
from: 'on'
to: 'off'
- platform: state
- trigger: state
id: occupied
entity_id:
- binary_sensor.entryway_occupied
- input_boolean.entryway_occupied
to: "on"
- platform: state
- trigger: state
id: door
entity_id:
- binary_sensor.inner_garage_door
# - binary_sensor.inner_garage_door
- binary_sensor.inner_garage_door_contact
- binary_sensor.front_door_contact
to: "on"
@@ -87,9 +87,9 @@ variables:
light_name: entryway_hue
mode_name: input_select.entryway_mode
action:
actions:
- alias: "Make sure Z-Wave switch is turned on"
service: homeassistant.turn_on
action: homeassistant.turn_on
target:
entity_id: "{{ switch_name }}"
- choose:
@@ -100,7 +100,7 @@ action:
entity_id: input_select.entryway_mode
state: Manual
sequence:
- service: light.turn_on
- action: light.turn_on
target:
entity_id: light.entryway_hue
@@ -115,7 +115,7 @@ action:
entity_id: light.entryway_hue
state: 'on'
sequence:
- service: scene.turn_on
- action: scene.turn_on
data:
transition: "{{ states('input_number.light_scene_transition') }}"
target:
@@ -132,7 +132,7 @@ action:
entity_id: light.entryway_hue
state: 'off'
sequence:
- service: scene.turn_on
- action: scene.turn_on
target:
entity_id: "scene.{{light_name}}_{{states('input_select.automatic_light_profile').lower().replace(' ','_')}}"
@@ -143,7 +143,7 @@ action:
entity_id: light.entryway_hue
state: 'on'
sequence:
- service: scene.turn_on
- action: scene.turn_on
data:
transition: "{{ states('input_number.light_scene_transition') }}"
target:
@@ -156,7 +156,7 @@ action:
entity_id: light.entryway_hue
state: 'off'
sequence:
- service: scene.turn_on
- action: scene.turn_on
target:
entity_id: "scene.{{light_name}}_{{states(mode_name).lower().replace(' ','_')}}"
+2 -2
View File
@@ -19,12 +19,12 @@ trigger:
- platform: state
id: door_open
entity_id: binary_sensor.outer_garage_door, binary_sensor.garage_door, binary_sensor.outer_garage_door_contact
entity_id: binary_sensor.garage_door, binary_sensor.outer_garage_door_contact #, binary_sensor.outer_garage_door
to: "on"
- platform: state
id: door_shut
entity_id: binary_sensor.outer_garage_door, binary_sensor.outer_garage_door_contact
entity_id: binary_sensor.outer_garage_door_contact #, binary_sensor.outer_garage_door
to: "off"
for:
minutes: 1
@@ -30,7 +30,7 @@ condition:
entity_id: input_boolean.computer_area_occupied
state: "off"
- condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: "off"
- condition: state
entity_id: binary_sensor.master_bedroom_occupied
@@ -9,8 +9,8 @@ trigger:
- platform: state
entity_id:
- binary_sensor.inner_garage_door
- binary_sensor.outer_garage_door
# - binary_sensor.inner_garage_door
# - binary_sensor.outer_garage_door
- binary_sensor.garage_door
- binary_sensor.outer_garage_door_contact
- binary_sensor.inner_garage_door_contact
@@ -37,9 +37,9 @@ trigger:
- platform: state
id: "doors_open"
entity_id:
- binary_sensor.inner_garage_door
# - binary_sensor.inner_garage_door
- binary_sensor.inner_garage_door_contact
- binary_sensor.outer_garage_door
# - binary_sensor.outer_garage_door
- binary_sensor.outer_garage_door_contact
from: "off"
to: "on"
@@ -47,9 +47,9 @@ trigger:
- platform: state
id: "doors_closed"
entity_id:
- binary_sensor.inner_garage_door
# - binary_sensor.inner_garage_door
- binary_sensor.inner_garage_door_contact
- binary_sensor.outer_garage_door
# - binary_sensor.outer_garage_door
- binary_sensor.outer_garage_door_contact
from: "on"
to: "off"
@@ -13,7 +13,7 @@ trigger:
for: '00:00:30'
- platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
to: 'on'
for: '00:00:05'
@@ -40,7 +40,7 @@ condition:
entity_id: sensor.pixel_7_charger_type
state: 'wireless'
- condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: 'on'
@@ -3,7 +3,7 @@ id: automation_master_bedroom_awake
trigger:
- platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
to: 'off'
for: '00:10:00'
@@ -25,7 +25,7 @@ condition:
- alias: "No one on master bed"
condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: 'off'
- alias: "The boolean is currently on"
@@ -24,7 +24,7 @@ condition:
state: 'off'
- condition: state
entity_id:
- input_boolean.master_bed_occupied
- binary_sensor.bed_presence_c175a4_bed_occupied_either
state:
- 'off'
- 'unavailable'
@@ -4,7 +4,7 @@ id: automation_master_bedroom_status
trigger:
- id: master_bed_not_occupied
platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
to: 'off'
for: '00:10:00'
@@ -13,15 +13,9 @@ trigger:
entity_id: sensor.pixel_7_charger_type
to: "wireless"
- id: master_bed_person_occupancy
platform: state
entity_id: binary_sensor.master_bedroom_person_occupancy
to: 'on'
for: '00:00:30'
- id: master_bed_right_occupied
platform: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_right
to: 'on'
for: '00:00:05'
@@ -54,7 +48,7 @@ condition:
- alias: "No one on master bed"
condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: 'off'
- alias: "Is the room asleep?"
@@ -82,7 +76,7 @@ condition:
- alias: "Someone on master bed"
condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: 'on'
action:
@@ -110,7 +104,7 @@ action:
- alias: "No one on master bed"
condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: 'off'
sequence:
- service: input_boolean.turn_off
@@ -139,7 +133,7 @@ action:
- alias: "Someone on master bed"
condition: state
entity_id: input_boolean.master_bed_occupied
entity_id: binary_sensor.bed_presence_c175a4_bed_occupied_either
state: 'on'
sequence:
- choose:
+16 -16
View File
@@ -3,65 +3,65 @@ id: automation_fan_speeds
mode: parallel
max: 4
trigger:
- platform: homeassistant
triggers:
- trigger: homeassistant
event: start
id: start
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.nursery_multisensor_air_temperature
id: nursery_off
below: input_number.nursery_fan_low_temp
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.nursery_multisensor_air_temperature
id: nursery_low
above: input_number.nursery_fan_low_temp
below: input_number.nursery_fan_medium_temp
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.nursery_multisensor_air_temperature
id: nursery_mid
above: input_number.nursery_fan_medium_temp
below: input_number.nursery_fan_high_temp
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.nursery_multisensor_air_temperature
id: nursery_high
above: input_number.nursery_fan_high_temp
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.master_bedroom_multisensor_air_temperature
below: input_number.master_bedroom_fan_low_temp
id: mbr_off
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.master_bedroom_multisensor_air_temperature
above: input_number.master_bedroom_fan_low_temp
below: input_number.master_bedroom_fan_medium_temp
id: mbr_low
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.master_bedroom_multisensor_air_temperature
above: input_number.master_bedroom_fan_medium_temp
below: input_number.master_bedroom_fan_high_temp
id: mbr_med
- platform: numeric_state
- trigger: numeric_state
entity_id: sensor.master_bedroom_multisensor_air_temperature
above: input_number.master_bedroom_fan_high_temp
id: mbr_high
- platform: state
- trigger: state
entity_id: input_boolean.nursery_occupied
- platform: state
- trigger: state
entity_id: input_boolean.master_bedroom_occupied
- platform: state
- trigger: state
entity_id: input_boolean.nursery_asleep
- platform: state
- trigger: state
entity_id: input_boolean.master_bedroom_asleep
# Chose not to use conditions so fan speeds will be updated regardless of trigger
@@ -69,7 +69,7 @@ trigger:
condition:
- alias: "Only turn the fans on if it's warm enough outside"
condition: template
value_template: "{{ (states('sensor.lacrosse_tx141thbv2_0_54_temperature') | float(default=0) > 60.0) or is_state('group.ceiling_fans','on') }}"
value_template: "{{ (states('sensor.lacrosse_tx141thbv2_0_temperature') | float(default=0) > 60.0) or is_state('group.ceiling_fans','on') }}"
action:
- alias: "Calculate fan speeds"
@@ -82,7 +82,7 @@ action:
# name: Automatic Fan Speeds
# entity_id: automation.automatic_fan_speeds
# message: >
# Outdoor Air Temp: {{states('sensor.lacrosse_tx141thbv2_0_54_temperature') | float(default=0)}}
# Outdoor Air Temp: {{states('sensor.lacrosse_tx141thbv2_0_temperature') | float(default=0)}}
# Nursery Air Temp: {{states('sensor.nursery_multisensor_air_temperature') | float(default=0)}}
# Nursery Min Temp: {{states('input_number.nursery_fan_min_temp') | float(default=0)}}
# Nursery High Temp: {{states('input_number.nursery_fan_high_temp') | float(default=0)}}
+1 -7
View File
@@ -8,10 +8,6 @@ trigger:
- binary_sensor.gray_suv_west_side
to: 'on'
- platform: state
entity_id: device_tracker.chevrolet_traverse_location
to: 'home'
- platform: homeassistant
event: start
condition:
@@ -32,9 +28,7 @@ condition:
- condition: state
entity_id: binary_sensor.west_side_vehicle_occupancy
state: 'on'
- condition: state
entity_id: device_tracker.chevrolet_traverse_location
state: 'home'
action:
- service: input_boolean.turn_on
entity_id: input_boolean.car_home