From 4e0e55ac3c4db97b2c71c0bc5677daa07c6a8375 Mon Sep 17 00:00:00 2001 From: CeeWeasel Date: Sat, 19 Jul 2025 13:37:45 -0400 Subject: [PATCH] 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. --- .../people/Bridget/bridget_in_bed.yaml | 20 +- automations/people/Clint/Clint_in_bed.yaml | 4 +- automations/people/Clint/Clint_up.yaml | 4 +- automations/people/Clint/Clint_wakeup.yaml | 4 +- automations/people/Ebin/ebin_in_bed.yaml | 34 +- automations/people/Kristy/kristy_in_bed.yaml | 4 +- automations/people/adults_awake.yaml | 4 +- automations/people/goodnight_kids.yaml | 12 +- automations/people/goodnight_kids_tts.yaml | 167 --------- automations/people/kids_awake.yaml | 340 +++++++++--------- .../baby_monitor_on_front_room_hub.yaml | 90 ++--- .../rooms/front_room/baby_monitor_on_tv.yaml | 96 ++--- .../master_bedroom/master_bedroom_asleep.yaml | 4 +- .../master_bedroom/master_bedroom_awake.yaml | 4 +- .../master_bedroom_not_occupied.yaml | 2 +- .../master_bedroom/master_bedroom_status.yaml | 12 +- .../master_bedroom_white_noise_on.yaml | 11 +- .../rooms/nursery/nursery_into_bed.yaml | 46 +-- .../rooms/nursery/nursery_not_occupied.yaml | 59 ++- .../rooms/nursery/nursery_out_of_bed.yaml | 142 ++++---- .../rooms/master_bedroom_occupied.yaml | 2 +- .../rooms/nursery_occupied.yaml | 13 +- components/binary_sensors/template.yaml | 8 +- .../master_bed/master_bed_loadcell_load.yaml | 5 - .../master_bed_loadcell_weight.yaml | 5 - .../master_bed/master_bed_loadcell_zero.yaml | 5 - .../master_bed/master_bed_occupied.yaml | 5 - customizations/entities/beds.yaml | 4 +- esphome/{ => archive}/master-bed.yaml | 0 esphome/archive/white-bed.yaml | 83 ++++- esphome/black-bed.yaml | 20 +- esphome/common/device_base.yaml | 2 + esphome/everything-presence-lite-8fa4fc.yaml | 5 + esphome/nursery-tagreader.yaml | 1 + esphome/power-monitor.yaml | 1 + esphome/white-bed.yaml | 78 ---- lovelace/cameras/view-camera-03.yaml | 4 +- lovelace/cameras/view-camera-08.yaml | 8 +- lovelace/frigate/view-ai-cam14.yaml | 2 - lovelace/phone/master-bedroom.yaml | 24 +- lovelace/phone/nursery.yaml | 16 +- lovelace/raw-cameras/indoor-camera-card.yaml | 2 +- lovelace/room_cards/master_bedroom.yaml | 2 +- lovelace/view-camera-overview.yaml | 88 ----- lovelace/view-ha-floorplan.yaml | 9 +- lovelace/view-overview.yaml | 21 +- .../wake_up_the_master_bedroom.yaml | 2 +- ui-cameras.yaml | 13 +- www/floorplan/fullsized_floorplan.svg | 8 +- 49 files changed, 605 insertions(+), 890 deletions(-) delete mode 100644 automations/people/goodnight_kids_tts.yaml delete mode 100644 components/input_numbers/master_bed/master_bed_loadcell_load.yaml delete mode 100644 components/input_numbers/master_bed/master_bed_loadcell_weight.yaml delete mode 100644 components/input_numbers/master_bed/master_bed_loadcell_zero.yaml delete mode 100644 components/input_numbers/master_bed/master_bed_occupied.yaml rename esphome/{ => archive}/master-bed.yaml (100%) delete mode 100644 esphome/white-bed.yaml delete mode 100644 lovelace/view-camera-overview.yaml diff --git a/automations/people/Bridget/bridget_in_bed.yaml b/automations/people/Bridget/bridget_in_bed.yaml index f9b15b1..78a2dc4 100644 --- a/automations/people/Bridget/bridget_in_bed.yaml +++ b/automations/people/Bridget/bridget_in_bed.yaml @@ -5,12 +5,12 @@ mode: restart trigger: - platform: state - entity_id: binary_sensor.white_bed_occupied - to: 'on' - for: '00:10:00' + entity_id: input_boolean.white_bed_occupied + to: "on" + for: "00:10:00" - platform: state entity_id: input_boolean.kids_bedtime - to: 'on' + to: "on" - platform: homeassistant event: start @@ -19,17 +19,17 @@ condition: entity_id: - input_boolean.bridget_home - input_boolean.kids_bedtime - state: 'on' + state: "on" - condition: state entity_id: - - binary_sensor.white_bed_occupied - state: 'on' - for: '00:10:00' + - input_boolean.white_bed_occupied + state: "on" + for: "00:10:00" - condition: state entity_id: input_boolean.bridget_in_bed - state: 'off' + state: "off" #- condition: state - # entity_id: binary_sensor.white_bed_occupied + # entity_id: input_boolean.white_bed_occupied # state: 'on' # for: # minutes: 5 diff --git a/automations/people/Clint/Clint_in_bed.yaml b/automations/people/Clint/Clint_in_bed.yaml index 69350c4..bd4e80a 100644 --- a/automations/people/Clint/Clint_in_bed.yaml +++ b/automations/people/Clint/Clint_in_bed.yaml @@ -5,7 +5,7 @@ id: automation_clint_in_bed trigger: # Bed in master bedroom is occupied - platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied to: 'on' # Radio playing - platform: state @@ -63,7 +63,7 @@ condition: - alias: "The bed is occupied" condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'on' action: - service: input_boolean.turn_on diff --git a/automations/people/Clint/Clint_up.yaml b/automations/people/Clint/Clint_up.yaml index a72f492..fbc5afa 100644 --- a/automations/people/Clint/Clint_up.yaml +++ b/automations/people/Clint/Clint_up.yaml @@ -10,7 +10,7 @@ trigger: entity_id: media_player.great_room to: 'idle' - platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied 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: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'off' for: '00:01:00' action: diff --git a/automations/people/Clint/Clint_wakeup.yaml b/automations/people/Clint/Clint_wakeup.yaml index afe31d3..098d9c9 100644 --- a/automations/people/Clint/Clint_wakeup.yaml +++ b/automations/people/Clint/Clint_wakeup.yaml @@ -8,7 +8,7 @@ trigger: entity_id: binary_sensor.morning to: 'on' - platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied to: 'on' condition: @@ -16,7 +16,7 @@ condition: entity_id: input_boolean.clint_home state: 'on' - condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'on' - condition: state entity_id: binary_sensor.morning diff --git a/automations/people/Ebin/ebin_in_bed.yaml b/automations/people/Ebin/ebin_in_bed.yaml index fe9d46a..02d712d 100644 --- a/automations/people/Ebin/ebin_in_bed.yaml +++ b/automations/people/Ebin/ebin_in_bed.yaml @@ -4,13 +4,13 @@ mode: restart trigger: - platform: state - entity_id: binary_sensor.white_bed_occupied - to: 'on' - for: '00:05:00' + entity_id: input_boolean.white_bed_occupied + to: "on" + for: "00:05:00" - platform: state entity_id: binary_sensor.black_bed_occupied - to: 'on' - for: '00:05:00' + to: "on" + for: "00:05:00" - platform: homeassistant event: start @@ -19,22 +19,22 @@ condition: entity_id: - input_boolean.ebin_home - input_boolean.kids_bedtime - state: 'on' + state: "on" - condition: state entity_id: input_boolean.ebin_in_bed - state: 'off' + state: "off" - condition: or conditions: - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'on' - for: - minutes: 5 - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'on' - for: - minutes: 5 + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "on" + for: + minutes: 5 + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "on" + for: + minutes: 5 action: - service: homeassistant.turn_on diff --git a/automations/people/Kristy/kristy_in_bed.yaml b/automations/people/Kristy/kristy_in_bed.yaml index 15f7111..6f742a4 100644 --- a/automations/people/Kristy/kristy_in_bed.yaml +++ b/automations/people/Kristy/kristy_in_bed.yaml @@ -4,7 +4,7 @@ id: automation_kristy_in_bed trigger: # Bed in master bedroom is occupied - platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied to: 'on' # Radio playing - platform: state @@ -31,7 +31,7 @@ condition: - alias: "The bed is occupied" condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'on' action: - service: input_boolean.turn_on diff --git a/automations/people/adults_awake.yaml b/automations/people/adults_awake.yaml index 58c09d8..61c0981 100644 --- a/automations/people/adults_awake.yaml +++ b/automations/people/adults_awake.yaml @@ -11,7 +11,7 @@ trigger: - input_boolean.clint_is_awake - input_boolean.kristy_in_bed - input_boolean.kristy_is_awake - - binary_sensor.master_bed_right_occupied + - input_boolean.master_bed_occupied - platform: time id: wake_clint @@ -38,7 +38,7 @@ condition: - condition: trigger id: wake_clint - condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'off' for: '00:10:00' - condition: and diff --git a/automations/people/goodnight_kids.yaml b/automations/people/goodnight_kids.yaml index 4113449..5d6009d 100644 --- a/automations/people/goodnight_kids.yaml +++ b/automations/people/goodnight_kids.yaml @@ -163,13 +163,13 @@ action: - choose: - conditions: "{{is_state('input_boolean.emmett_home','on') or is_state('input_boolean.bridget_home','on')}}" sequence: - - service: media_player.turn_off - target: - entity_id: media_player.ytube_music_player - - - delay: "00:00:05" - - service: input_boolean.turn_on data: {} target: entity_id: input_boolean.nursery_asleep + + - delay: "00:00:05" + + - service: media_player.turn_off + target: + entity_id: media_player.ytube_music_player diff --git a/automations/people/goodnight_kids_tts.yaml b/automations/people/goodnight_kids_tts.yaml deleted file mode 100644 index 1de600b..0000000 --- a/automations/people/goodnight_kids_tts.yaml +++ /dev/null @@ -1,167 +0,0 @@ -alias: 'Goodnight Kids TTS' -id: automation_goodnight_kids_tts -initial_state: off -trigger: - platform: time - at: input_datetime.kids_bedtime_announcement_time -condition: - - condition: state - entity_id: input_boolean.announce_bedtime - 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' -action: - - service: homeassistant.turn_on - entity_id: input_boolean.kids_bedtime - - - service: media_player.volume_set - data_template: - entity_id: - - media_player.bathroom_mini - - media_player.bathroom_mini - - media_player.front_room_hub - - media_player.kitchen - - media_player.nursery_hub - - media_player.master_bedroom_clock - volume_level: 0.7 - - - delay: '00:00:01' - - - service: tts.google_translate_say - entity_id: media_player.all_speakers - data_template: - message: > - It is time for bed. - {% if is_state('input_boolean.emmett_home', 'on') %} - Good night Emmett - {% if is_state('input_boolean.bridget_home', 'on') %} - {% if is_state('input_boolean.ebin_home', 'on') %} - Good night Bridget and good night Ebin - {% else %} - and good night Bridget - {% endif %} - {% elif is_state('input_boolean.ebin_home','on') %} - and good night Ebin - {% endif %} - {% elif is_state('input_boolean.bridget_home', 'on') %} - {% if is_state('input_boolean.ebin_home', 'on') %} - Good night Bridget and good night Ebin - {% else %} - Good Night Bridget - {% endif %} - {% elif is_state('input_boolean.ebin_home', 'on') %} - Good night Ebin - {% endif %} - - delay: '00:00:10' - - - service: homeassistant.turn_off - entity_id: - - media_player.all_speakers - - media_player.front_room_tv - - media_player.downstairs_roku - #- switch.shelly_projector - - - service: input_select.select_option - data: - entity_id: input_select.automatic_light_profile - option: Dimmed - - - choose: - - conditions: - - condition: state - entity_id: input_boolean.emmett_home - state: 'on' - - condition: state - entity_id: input_boolean.emmett_in_bed - state: 'off' - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'on' - sequence: - - service: homeassistant.turn_on - entity_id: input_boolean.emmett_in_bed - - - choose: - - conditions: - - condition: state - entity_id: input_boolean.bridget_home - state: 'on' - - condition: state - entity_id: input_boolean.bridget_in_bed - state: 'off' - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'on' - sequence: - - service: homeassistant.turn_on - entity_id: input_boolean.bridget_in_bed - - - choose: - - conditions: - - condition: state - entity_id: input_boolean.ebin_home - state: 'on' - - condition: state - entity_id: input_boolean.ebin_in_bed - state: 'off' - sequence: - - service: homeassistant.turn_on - entity_id: input_boolean.ebin_in_bed - - - service: light.turn_on - data: - entity_id: - - light.black_bed_wled - - light.white_bed_wled - brightness_pct: 50 - effect: random - - - service: input_select.select_option - data: - entity_id: input_select.nursery_mode - option: 'Nightlight' - - - delay: "00:15:00" - - - service: input_select.select_option - data: - entity_id: input_select.nursery_mode - option: 'Off' - - - service: input_boolean.turn_on - entity_id: input_boolean.nursery_light_cycle - - #- service: input_select.select_option - # data: - # entity_id: input_select.google_home - # option: 'Nursery' - #- service: input_select.select_option - # data: - # entity_id: input_select.ambient_sound - # option: 'Random Kids Noise' - #- service: input_number.set_value - # data: - # entity_id: input_number.volume_ambientsounds - # value: '0.40' - #- service: script.ambientsounds - - delay: "00:30:00" - - service: input_boolean.turn_off - entity_id: input_boolean.nursery_light_cycle - - service: light.turn_off - data: - entity_id: - - light.black_bed_wled - - light.white_bed_wled - - service: input_select.select_option - data: - entity_id: input_select.nursery_mode - option: 'Off' diff --git a/automations/people/kids_awake.yaml b/automations/people/kids_awake.yaml index 2980e41..16b2c28 100644 --- a/automations/people/kids_awake.yaml +++ b/automations/people/kids_awake.yaml @@ -11,97 +11,96 @@ trigger: - input_boolean.ebin_is_awake - input_boolean.kids_away - binary_sensor.morning - to: 'on' - + to: "on" - platform: state entity_id: - binary_sensor.black_bed_occupied - - binary_sensor.white_bed_occupied - to: 'off' - for: '00:05:00' + - input_boolean.white_bed_occupied + to: "off" + for: "00:05:00" - platform: homeassistant event: start condition: - alias: "Kids should only be considered awake if they get out of bed after 6:00 AM and before 7:00 PM" condition: time - before: '19:00:00' - after: '06:00:00' + before: "19:00:00" + after: "06:00:00" - alias: "Go through all the kids that are considered home and see if their bed is occupied" condition: and conditions: - - condition: or - conditions: - - condition: state - entity_id: input_boolean.emmett_home - state: 'off' - - condition: and + - condition: or conditions: - - condition: state - entity_id: input_boolean.emmett_is_awake - state: 'off' - - condition: state - entity_id: input_boolean.emmett_home - state: 'on' - - condition: or - conditions: - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'unavailable' - - condition: or - conditions: - - condition: state - entity_id: input_boolean.bridget_home - state: 'off' - - condition: and + entity_id: input_boolean.emmett_home + state: "off" + - condition: and + conditions: + - condition: state + entity_id: input_boolean.emmett_is_awake + state: "off" + - condition: state + entity_id: input_boolean.emmett_home + state: "on" + - condition: or + conditions: + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "off" + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "unavailable" + - condition: or conditions: - - condition: state - entity_id: input_boolean.bridget_is_awake - state: 'off' - - condition: state - entity_id: input_boolean.bridget_home - state: 'on' - - condition: or - conditions: - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'unavailable' - - condition: or - conditions: - - condition: state - entity_id: input_boolean.ebin_home - state: 'off' - - condition: and + entity_id: input_boolean.bridget_home + state: "off" + - condition: and + conditions: + - condition: state + entity_id: input_boolean.bridget_is_awake + state: "off" + - condition: state + entity_id: input_boolean.bridget_home + state: "on" + - condition: or + conditions: + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "off" + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "unavailable" + - condition: or conditions: - - condition: state - entity_id: input_boolean.ebin_is_awake - state: 'off' - - condition: state - entity_id: input_boolean.ebin_home - state: 'on' - - condition: or - conditions: - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'unavailable' - - condition: or - conditions: - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'unavailable' + entity_id: input_boolean.ebin_home + state: "off" + - condition: and + conditions: + - condition: state + entity_id: input_boolean.ebin_is_awake + state: "off" + - condition: state + entity_id: input_boolean.ebin_home + state: "on" + - condition: or + conditions: + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "off" + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "unavailable" + - condition: or + conditions: + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "off" + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "unavailable" action: - service: input_boolean.turn_off entity_id: @@ -109,108 +108,107 @@ action: - input_boolean.kids_asleep - choose: - - conditions: - - condition: state - entity_id: input_boolean.emmett_is_awake - state: 'off' - - condition: state - entity_id: input_boolean.emmett_home - state: 'on' - - condition: or - conditions: - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'unavailable' - sequence: - - service: input_boolean.turn_off - entity_id: input_boolean.emmett_in_bed - - service: input_boolean.turn_on - entity_id: input_boolean.emmett_is_awake + - conditions: + - condition: state + entity_id: input_boolean.emmett_is_awake + state: "off" + - condition: state + entity_id: input_boolean.emmett_home + state: "on" + - condition: or + conditions: + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "off" + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "unavailable" + sequence: + - service: input_boolean.turn_off + entity_id: input_boolean.emmett_in_bed + - service: input_boolean.turn_on + entity_id: input_boolean.emmett_is_awake - choose: - - conditions: - - condition: state - entity_id: input_boolean.bridget_is_awake - state: 'off' - - condition: state - entity_id: input_boolean.bridget_home - state: 'on' - - condition: or - conditions: - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'unavailable' - sequence: - - service: input_boolean.turn_off - entity_id: input_boolean.bridget_in_bed - - service: input_boolean.turn_on - entity_id: input_boolean.bridget_is_awake + - conditions: + - condition: state + entity_id: input_boolean.bridget_is_awake + state: "off" + - condition: state + entity_id: input_boolean.bridget_home + state: "on" + - condition: or + conditions: + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "off" + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "unavailable" + sequence: + - service: input_boolean.turn_off + entity_id: input_boolean.bridget_in_bed + - service: input_boolean.turn_on + entity_id: input_boolean.bridget_is_awake - choose: - - conditions: - - condition: state - entity_id: input_boolean.ebin_is_awake - state: 'off' - - condition: state - entity_id: input_boolean.ebin_home - state: 'on' - - condition: or - conditions: - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'unavailable' - - condition: or - conditions: - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'unavailable' - sequence: - - service: input_boolean.turn_off - entity_id: input_boolean.ebin_in_bed - - service: input_boolean.turn_on - entity_id: input_boolean.bridget_is_awake + - conditions: + - condition: state + entity_id: input_boolean.ebin_is_awake + state: "off" + - condition: state + entity_id: input_boolean.ebin_home + state: "on" + - condition: or + conditions: + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "off" + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "unavailable" + - condition: or + conditions: + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "off" + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "unavailable" + sequence: + - service: input_boolean.turn_off + entity_id: input_boolean.ebin_in_bed + - service: input_boolean.turn_on + entity_id: input_boolean.bridget_is_awake - choose: - - conditions: - - condition: or - conditions: - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.black_bed_occupied - state: 'unavailable' - - condition: or - conditions: - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'off' - - condition: state - entity_id: binary_sensor.white_bed_occupied - state: 'unavailable' - - condition: not - conditions: - - condition: state - entity_id: input_select.nursery_mode - state: 'Manual' - - condition: state - entity_id: input_select.house - state: 'Away' - sequence: - - service: input_select.select_option - data: - entity_id: input_select.nursery_mode - option: Auto - + - conditions: + - condition: or + conditions: + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "off" + - condition: state + entity_id: binary_sensor.black_bed_occupied + state: "unavailable" + - condition: or + conditions: + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "off" + - condition: state + entity_id: input_boolean.white_bed_occupied + state: "unavailable" + - condition: not + conditions: + - condition: state + entity_id: input_select.nursery_mode + state: "Manual" + - condition: state + entity_id: input_select.house + state: "Away" + sequence: + - service: input_select.select_option + data: + entity_id: input_select.nursery_mode + option: Auto diff --git a/automations/rooms/front_room/baby_monitor_on_front_room_hub.yaml b/automations/rooms/front_room/baby_monitor_on_front_room_hub.yaml index 9f0619d..05ba735 100644 --- a/automations/rooms/front_room/baby_monitor_on_front_room_hub.yaml +++ b/automations/rooms/front_room/baby_monitor_on_front_room_hub.yaml @@ -4,66 +4,66 @@ id: automation_baby_monitor_on_hub trigger: - platform: state entity_id: binary_sensor.black_bed_occupied - to: 'off' - for: '00:00:03' + to: "off" + for: "00:00:03" - platform: state - entity_id: binary_sensor.white_bed_occupied - to: 'off' - for: '00:00:03' + entity_id: input_boolean.white_bed_occupied + to: "off" + for: "00:00:03" condition: - condition: state entity_id: binary_sensor.kids_at_home - state: 'on' + state: "on" - condition: state entity_id: group.kids_in_bed - state: 'on' + state: "on" - condition: state entity_id: input_boolean.home_occupied - state: 'on' + state: "on" - condition: state entity_id: binary_sensor.front_room_person_occupancy - state: 'on' + state: "on" - condition: or conditions: - - condition: state - entity_id: media_player.front_room_hub - state: 'off' - - condition: state - entity_id: media_player.front_room_hub - state: 'idle' + - condition: state + entity_id: media_player.front_room_hub + state: "off" + - condition: state + entity_id: media_player.front_room_hub + state: "idle" action: -- choose: - - conditions: - - condition: state - entity_id: timer.nursery_camera_on_hub - state: 'idle' - sequence: - - service: media_player.volume_set - data: - entity_id: media_player.front_room_hub - volume_level: 0.1 + - choose: + - conditions: + - condition: state + entity_id: timer.nursery_camera_on_hub + state: "idle" + sequence: + - service: media_player.volume_set + data: + entity_id: media_player.front_room_hub + volume_level: 0.1 - - service: media_player.play_media - target: - entity_id: media_player.front_room_hub - data: - media_content_id: camera-casting-yml/nursery-camera - media_content_type: lovelace - metadata: - title: Nursery Camera - thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png - media_class: app - children_media_class: null - navigateIds: - - {} - - media_content_type: lovelace - media_content_id: '' - - media_content_type: lovelace - media_content_id: camera-casting-yml + - service: media_player.play_media + target: + entity_id: media_player.front_room_hub + data: + media_content_id: camera-casting-yml/nursery-camera + media_content_type: lovelace + metadata: + title: Nursery Camera + thumbnail: https://brands.home-assistant.io/_/lovelace/logo.png + media_class: app + children_media_class: null + navigateIds: + - {} + - media_content_type: lovelace + media_content_id: "" + - media_content_type: lovelace + media_content_id: camera-casting-yml -- service: timer.start - data: - entity_id: timer.nursery_camera_on_hub + - service: timer.start + data: + entity_id: timer.nursery_camera_on_hub diff --git a/automations/rooms/front_room/baby_monitor_on_tv.yaml b/automations/rooms/front_room/baby_monitor_on_tv.yaml index 7a55b14..3da6db8 100644 --- a/automations/rooms/front_room/baby_monitor_on_tv.yaml +++ b/automations/rooms/front_room/baby_monitor_on_tv.yaml @@ -4,69 +4,69 @@ id: automation_baby_monitor_on_tv trigger: - platform: state entity_id: binary_sensor.black_bed_occupied - to: 'off' - for: '00:00:03' + to: "off" + for: "00:00:03" - platform: state - entity_id: binary_sensor.white_bed_occupied - to: 'off' - for: '00:00:03' + entity_id: input_boolean.white_bed_occupied + to: "off" + for: "00:00:03" condition: - condition: state entity_id: input_boolean.home_occupied - state: 'on' + state: "on" - condition: state entity_id: input_boolean.front_room_occupied - state: 'on' + state: "on" - condition: or conditions: - - condition: state - entity_id: media_player.front_room_tv - state: 'off' - - condition: state - entity_id: media_player.front_room_tv - state: 'standby' + - condition: state + entity_id: media_player.front_room_tv + state: "off" + - condition: state + entity_id: media_player.front_room_tv + state: "standby" - condition: state entity_id: input_boolean.computer_area_occupied - state: 'off' + state: "off" - condition: state - entity_id: binary_sensor.master_bed_right_occupied - state: 'off' + entity_id: input_boolean.master_bed_occupied + state: "off" - condition: state entity_id: binary_sensor.master_bedroom_occupied - state: 'off' + state: "off" - condition: state entity_id: input_boolean.master_bedroom_occupied - state: 'off' + state: "off" - condition: state entity_id: input_boolean.master_bedroom_asleep - state: 'off' + state: "off" - condition: or conditions: - condition: and conditions: - - condition: state - entity_id: input_boolean.emmett_home - state: 'on' - - condition: state - entity_id: input_boolean.emmett_in_bed - state: 'on' + - condition: state + entity_id: input_boolean.emmett_home + state: "on" + - condition: state + entity_id: input_boolean.emmett_in_bed + state: "on" - condition: and conditions: - - condition: state - entity_id: input_boolean.bridget_home - state: 'on' - - condition: state - entity_id: input_boolean.bridget_in_bed - state: 'on' + - condition: state + entity_id: input_boolean.bridget_home + state: "on" + - condition: state + entity_id: input_boolean.bridget_in_bed + state: "on" - condition: and conditions: - - condition: state - entity_id: input_boolean.ebin_home - state: 'on' - - condition: state - entity_id: input_boolean.ebin_in_bed - state: 'on' + - condition: state + entity_id: input_boolean.ebin_home + state: "on" + - condition: state + entity_id: input_boolean.ebin_in_bed + state: "on" - condition: not conditions: - condition: state @@ -78,17 +78,17 @@ condition: - condition: state entity_id: media_player.front_room_tv attribute: source - state: 'IP Camera Viewer - Pro' + state: "IP Camera Viewer - Pro" action: -- choose: - - conditions: - - condition: state - entity_id: timer.nursery_camera_on_hub - state: 'idle' - sequence: - - service: rest_command.nursery_on_roku_1 + - choose: + - conditions: + - condition: state + entity_id: timer.nursery_camera_on_hub + state: "idle" + sequence: + - service: rest_command.nursery_on_roku_1 -- service: timer.start - data: - entity_id: timer.nursery_camera_on_tv + - service: timer.start + data: + entity_id: timer.nursery_camera_on_tv diff --git a/automations/rooms/master_bedroom/master_bedroom_asleep.yaml b/automations/rooms/master_bedroom/master_bedroom_asleep.yaml index 77bc4e3..6324b82 100644 --- a/automations/rooms/master_bedroom/master_bedroom_asleep.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_asleep.yaml @@ -13,7 +13,7 @@ trigger: for: '00:00:30' - platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied to: 'on' for: '00:00:05' @@ -40,7 +40,7 @@ condition: entity_id: sensor.pixel_7_charger_type state: 'wireless' - condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'on' diff --git a/automations/rooms/master_bedroom/master_bedroom_awake.yaml b/automations/rooms/master_bedroom/master_bedroom_awake.yaml index 8d11ec4..c212eb0 100644 --- a/automations/rooms/master_bedroom/master_bedroom_awake.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_awake.yaml @@ -3,7 +3,7 @@ id: automation_master_bedroom_awake trigger: - platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied to: 'off' for: '00:10:00' @@ -25,7 +25,7 @@ condition: - alias: "No one on master bed" condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'off' - alias: "The boolean is currently on" diff --git a/automations/rooms/master_bedroom/master_bedroom_not_occupied.yaml b/automations/rooms/master_bedroom/master_bedroom_not_occupied.yaml index eebd1e4..2b5f692 100644 --- a/automations/rooms/master_bedroom/master_bedroom_not_occupied.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_not_occupied.yaml @@ -24,7 +24,7 @@ condition: state: 'off' - condition: state entity_id: - - binary_sensor.master_bed_right_occupied + - input_boolean.master_bed_occupied state: - 'off' - 'unavailable' diff --git a/automations/rooms/master_bedroom/master_bedroom_status.yaml b/automations/rooms/master_bedroom/master_bedroom_status.yaml index 527b5a8..ede2a77 100644 --- a/automations/rooms/master_bedroom/master_bedroom_status.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_status.yaml @@ -4,7 +4,7 @@ id: automation_master_bedroom_status trigger: - id: master_bed_not_occupied platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied to: 'off' for: '00:10:00' @@ -21,7 +21,7 @@ trigger: - id: master_bed_right_occupied platform: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied to: 'on' for: '00:00:05' @@ -54,7 +54,7 @@ condition: - alias: "No one on master bed" condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'off' - alias: "Is the room asleep?" @@ -82,7 +82,7 @@ condition: - alias: "Someone on master bed" condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'on' action: @@ -110,7 +110,7 @@ action: - alias: "No one on master bed" condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'off' sequence: - service: input_boolean.turn_off @@ -139,7 +139,7 @@ action: - alias: "Someone on master bed" condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: 'on' sequence: - choose: diff --git a/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml b/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml index f6fc400..adef8fe 100644 --- a/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_white_noise_on.yaml @@ -13,7 +13,7 @@ action: # option: 'Off' - action: media_player.volume_set data: - volume_level: 0.3 + volume_level: 0.25 target: device_id: d534ab473e271021b537397cbc6fe700 @@ -29,7 +29,7 @@ action: - action: media_player.repeat_set metadata: {} data: - repeat: all + repeat: "off" target: device_id: d534ab473e271021b537397cbc6fe700 - action: music_assistant.play_media @@ -40,4 +40,11 @@ action: enqueue: replace target: device_id: d534ab473e271021b537397cbc6fe700 + - action: music_assistant.play_media + target: + device_id: d534ab473e271021b537397cbc6fe700 + data: + media_id: library://track/101 + media_type: track + enqueue: add diff --git a/automations/rooms/nursery/nursery_into_bed.yaml b/automations/rooms/nursery/nursery_into_bed.yaml index cc808bc..ff7d549 100644 --- a/automations/rooms/nursery/nursery_into_bed.yaml +++ b/automations/rooms/nursery/nursery_into_bed.yaml @@ -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 diff --git a/automations/rooms/nursery/nursery_not_occupied.yaml b/automations/rooms/nursery/nursery_not_occupied.yaml index 4d508dc..f470107 100644 --- a/automations/rooms/nursery/nursery_not_occupied.yaml +++ b/automations/rooms/nursery/nursery_not_occupied.yaml @@ -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 \ No newline at end of file + - 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 diff --git a/automations/rooms/nursery/nursery_out_of_bed.yaml b/automations/rooms/nursery/nursery_out_of_bed.yaml index 4e7ba95..c1d3d0b 100644 --- a/automations/rooms/nursery/nursery_out_of_bed.yaml +++ b/automations/rooms/nursery/nursery_out_of_bed.yaml @@ -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 diff --git a/components/binary_sensors/rooms/master_bedroom_occupied.yaml b/components/binary_sensors/rooms/master_bedroom_occupied.yaml index 222c59b..3a38d69 100644 --- a/components/binary_sensors/rooms/master_bedroom_occupied.yaml +++ b/components/binary_sensors/rooms/master_bedroom_occupied.yaml @@ -6,7 +6,7 @@ prior: 0.25 probability_threshold: 0.75 observations: - - entity_id: binary_sensor.master_bed_right_occupied + - entity_id: input_boolean.master_bed_occupied platform: state prob_given_true: .83 prob_given_false: 0.0 diff --git a/components/binary_sensors/rooms/nursery_occupied.yaml b/components/binary_sensors/rooms/nursery_occupied.yaml index b0a0c0a..0e9cb7b 100644 --- a/components/binary_sensors/rooms/nursery_occupied.yaml +++ b/components/binary_sensors/rooms/nursery_occupied.yaml @@ -5,10 +5,9 @@ device_class: occupancy prior: 0.25 probability_threshold: 0.90 observations: - - platform: state entity_id: group.nursery_motion - to_state: 'on' + to_state: "on" prob_given_true: .33 prob_given_false: 0.0 @@ -16,17 +15,17 @@ observations: prob_given_true: .33 prob_given_false: 0.0 platform: state - to_state: 'on' + to_state: "on" - platform: state entity_id: binary_sensor.black_bed_occupied - to_state: 'on' + to_state: "on" prob_given_true: .67 prob_given_false: 0.0 - platform: state - entity_id: binary_sensor.white_bed_occupied - to_state: 'on' + entity_id: input_boolean.white_bed_occupied + to_state: "on" prob_given_true: .67 prob_given_false: 0.0 @@ -34,4 +33,4 @@ observations: platform: state prob_given_true: .92 prob_given_false: 0.5 - to_state: 'on' \ No newline at end of file + to_state: "on" diff --git a/components/binary_sensors/template.yaml b/components/binary_sensors/template.yaml index fe0a6a6..cb104ac 100644 --- a/components/binary_sensors/template.yaml +++ b/components/binary_sensors/template.yaml @@ -123,13 +123,13 @@ sensors: unique_id: templatebinarysensor.master_bed_left_occupied friendly_name: Master Bedroom Left Occupied icon_template: mdi:bed-king - value_template: "{{ is_state('binary_sensor.master_bed_occupied','on') and states('sensor.master_bed_weight') | float(default=0) > 200 }}" + value_template: "{{ is_state('input_boolean.master_bed_occupied','on') and is_state('person.kristy','home') }}" master_bed_right_occupied: unique_id: templatebinarysensor.master_bed_right_occupied friendly_name: Master Bedroom Right Occupied icon_template: mdi:bed-king - value_template: "{{ is_state('binary_sensor.master_bed_occupied','on') or is_state('input_boolean.master_bed_occupied','on') }}" + value_template: "{{ is_state('input_boolean.master_bed_occupied','on') }}" bathroom_getting_humid: unique_id: templatebinarysensor.bathroom_getting_humid @@ -721,8 +721,8 @@ sensors: bridgets_bed: unique_id: templatebinarysensor.bridgets_bed friendly_name: Bridget's Bed - value_template: "{{ states('binary_sensor.white_bed_occupied') }}" - icon_template: "{{ iif(is_state('binary_sensor.white_bed_occupied','on'),'mdi:bed','mdi:bed-empty','mdi:bed-outline')}}" + value_template: "{{ states('input_boolean.white_bed_occupied') }}" + icon_template: "{{ iif(is_state('input_boolean.white_bed_occupied','on'),'mdi:bed','mdi:bed-empty','mdi:bed-outline')}}" check_mail: unique_id: templatebinarysensor.check_mail diff --git a/components/input_numbers/master_bed/master_bed_loadcell_load.yaml b/components/input_numbers/master_bed/master_bed_loadcell_load.yaml deleted file mode 100644 index c0572df..0000000 --- a/components/input_numbers/master_bed/master_bed_loadcell_load.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: Master Bed LoadCell Load -icon: mdi:weight -min: -8388000 -max: 8388000 -mode: box \ No newline at end of file diff --git a/components/input_numbers/master_bed/master_bed_loadcell_weight.yaml b/components/input_numbers/master_bed/master_bed_loadcell_weight.yaml deleted file mode 100644 index 7c13a6f..0000000 --- a/components/input_numbers/master_bed/master_bed_loadcell_weight.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: Master Bed LoadCell Weight -icon: mdi:weight-pound -min: 0 -max: 300 -mode: box \ No newline at end of file diff --git a/components/input_numbers/master_bed/master_bed_loadcell_zero.yaml b/components/input_numbers/master_bed/master_bed_loadcell_zero.yaml deleted file mode 100644 index 4a9a060..0000000 --- a/components/input_numbers/master_bed/master_bed_loadcell_zero.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: Master Bed LoadCell Zero -icon: mdi:weight -min: -8388000 -max: 8388000 -mode: box \ No newline at end of file diff --git a/components/input_numbers/master_bed/master_bed_occupied.yaml b/components/input_numbers/master_bed/master_bed_occupied.yaml deleted file mode 100644 index 1762e36..0000000 --- a/components/input_numbers/master_bed/master_bed_occupied.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: Master Bed Occupied -icon: mdi:weight-pound -min: 0 -max: 300 -mode: box \ No newline at end of file diff --git a/customizations/entities/beds.yaml b/customizations/entities/beds.yaml index f0cd781..b05c953 100644 --- a/customizations/entities/beds.yaml +++ b/customizations/entities/beds.yaml @@ -1,8 +1,8 @@ binary_sensor.black_bed_occupied: icon: mdi:bed -binary_sensor.white_bed_occupied: +input_boolean.white_bed_occupied: icon: mdi:bed -binary_sensor.master_bed_occupied: +input_boolean.master_bed_occupied: icon: mdi:bed-king diff --git a/esphome/master-bed.yaml b/esphome/archive/master-bed.yaml similarity index 100% rename from esphome/master-bed.yaml rename to esphome/archive/master-bed.yaml diff --git a/esphome/archive/white-bed.yaml b/esphome/archive/white-bed.yaml index 6bb3319..9a0c1b0 100644 --- a/esphome/archive/white-bed.yaml +++ b/esphome/archive/white-bed.yaml @@ -5,23 +5,74 @@ substitutions: platform: ESP32 board: nodemcu-32s static_ip: !secret white-bed-ip - dout_pin: !secret white-bed-dout - clk_pin: !secret white-bed-clk - loadcell_zero: !secret white-bed-zero - loadcell_load: !secret white-bed-load - loadcell_weight: !secret white-bed-weight + center_sensor_gpio: GPIO34 -# Enable logging -# logger: -# level: DEBUG -# logs: -# sensor: INFO -# hx711: DEBUG - -packages: - wifi: !include common/wifi.yaml - device_base: !include common/device_base.yaml - # hx711: !include common/hx711_single_verbose.yaml esp32: board: nodemcu-32s + framework: + type: esp-idf + +esphome: + name: ${devicename} +# platform: ${platform} +# board: ${board} + +# Enable logging +logger: + +# Sync time with Home Assistant. +time: + - platform: homeassistant + id: homeassistant_time + +# Enable Home Assistant API +api: + reboot_timeout: 15min + +ota: + - platform: esphome + + +packages: + #wifi: !include common/wifi.yaml + wifi: !include common/wifi_no_power_save.yaml + ble: !include bed-presence/bluetooth-proxy.yaml + + diagnostics: !include + file: bed-presence/diagnostics.yaml + vars: + boot_gpio: GPIO9 + uptime_id: bed_presence_uptime + restart_id: btn_restart + status_id: bed_presence_status + + bed_sensor: !include + file: bed-presence/sensor.yaml + vars: + sensor_name: Center + sensor_id: center_occupied + sensor_gpio: ${center_sensor_gpio} + +switch: + - platform: template + name: Full Range + id: full_range + optimistic: true + restore_mode: RESTORE_DEFAULT_OFF + entity_category: config + icon: mdi:arrow-expand + +select: + - platform: template + name: "Response Speed" + id: response_speed + icon: mdi:speedometer + optimistic: true + restore_value: true + options: + - "Fast" + - "Normal" + - "Slow" + initial_option: "Normal" + entity_category: config \ No newline at end of file diff --git a/esphome/black-bed.yaml b/esphome/black-bed.yaml index 1edf0bb..d3d3b18 100644 --- a/esphome/black-bed.yaml +++ b/esphome/black-bed.yaml @@ -1,6 +1,7 @@ substitutions: devicename: black-bed friendly_name: Black Bed + comment: Clever Bed Sensor entity_name: black_bed platform: ESP8266 board: nodemcuv2 @@ -24,4 +25,21 @@ packages: hx711: !include common/hx711_single_verbose.yaml esp8266: - board: nodemcuv2 \ No newline at end of file + board: nodemcuv2 + +# font: +# - file: 'fonts/mdi.ttf' +# id: mdi_weather +# size: 96 +# glyphs: &mdi-weather-glyphs +# - "\U000F0599" # mdi-weather-sunny +# - "\U000F0594" # mdi-weather-night +# - "\U000F0595" # mdi-weather-partly-cloudy +# - "\U000F0F31" # mdi-weather-night-partly-cloudy +# - "\U000F0590" # mdi-weather-cloudy +# - "\U000F0591" # mdi-weather-fog +# - "\U000F0597" # mdi-weather-rainy +# - "\U000F0598" # mdi-weather-snowy +# - "\U000F067F" # mdi-weather-snowy-rainy +# - "\U000F0596" # mdi-weather-pouring +# - "\U000F067E" # mdi-weather-lightning-rainy diff --git a/esphome/common/device_base.yaml b/esphome/common/device_base.yaml index 6d97181..64c9ffc 100644 --- a/esphome/common/device_base.yaml +++ b/esphome/common/device_base.yaml @@ -1,5 +1,7 @@ esphome: name: ${devicename} + comment: ${comment} + friendly_name: ${friendly_name} # platform: ${platform} # board: ${board} diff --git a/esphome/everything-presence-lite-8fa4fc.yaml b/esphome/everything-presence-lite-8fa4fc.yaml index 96f857c..4538158 100644 --- a/esphome/everything-presence-lite-8fa4fc.yaml +++ b/esphome/everything-presence-lite-8fa4fc.yaml @@ -15,3 +15,8 @@ api: wifi: ssid: !secret wifi_ssid password: !secret wifi_password + +binary_sensor: + - platform: status + name: "Everything Presence Great Room Status" + id: everything_presence_lite_8fa4fc_status \ No newline at end of file diff --git a/esphome/nursery-tagreader.yaml b/esphome/nursery-tagreader.yaml index f824497..f58cd4a 100644 --- a/esphome/nursery-tagreader.yaml +++ b/esphome/nursery-tagreader.yaml @@ -2,6 +2,7 @@ substitutions: devicename: nursery-tagreader entity_name: nursery_tagreader friendly_name: Nursery Tagreader + comment: Clever Tag Reader platform: ESP8266 board: d1_mini static_ip: !secret nursery-tagreader-ip diff --git a/esphome/power-monitor.yaml b/esphome/power-monitor.yaml index 9e6e6f1..0e3845c 100644 --- a/esphome/power-monitor.yaml +++ b/esphome/power-monitor.yaml @@ -15,6 +15,7 @@ substitutions: devicename: power-monitor friendly_name: 'PM:' entity_name: power_monitor + comment: Clever Power Monitor static_ip: !secret power-monitor-ip platform: ESP32 board: nodemcu-32s diff --git a/esphome/white-bed.yaml b/esphome/white-bed.yaml deleted file mode 100644 index 9a0c1b0..0000000 --- a/esphome/white-bed.yaml +++ /dev/null @@ -1,78 +0,0 @@ -substitutions: - devicename: white-bed - entity_name: white_bed - friendly_name: White Bed - platform: ESP32 - board: nodemcu-32s - static_ip: !secret white-bed-ip - center_sensor_gpio: GPIO34 - - -esp32: - board: nodemcu-32s - framework: - type: esp-idf - -esphome: - name: ${devicename} -# platform: ${platform} -# board: ${board} - -# Enable logging -logger: - -# Sync time with Home Assistant. -time: - - platform: homeassistant - id: homeassistant_time - -# Enable Home Assistant API -api: - reboot_timeout: 15min - -ota: - - platform: esphome - - -packages: - #wifi: !include common/wifi.yaml - wifi: !include common/wifi_no_power_save.yaml - ble: !include bed-presence/bluetooth-proxy.yaml - - diagnostics: !include - file: bed-presence/diagnostics.yaml - vars: - boot_gpio: GPIO9 - uptime_id: bed_presence_uptime - restart_id: btn_restart - status_id: bed_presence_status - - bed_sensor: !include - file: bed-presence/sensor.yaml - vars: - sensor_name: Center - sensor_id: center_occupied - sensor_gpio: ${center_sensor_gpio} - -switch: - - platform: template - name: Full Range - id: full_range - optimistic: true - restore_mode: RESTORE_DEFAULT_OFF - entity_category: config - icon: mdi:arrow-expand - -select: - - platform: template - name: "Response Speed" - id: response_speed - icon: mdi:speedometer - optimistic: true - restore_value: true - options: - - "Fast" - - "Normal" - - "Slow" - initial_option: "Normal" - entity_category: config \ No newline at end of file diff --git a/lovelace/cameras/view-camera-03.yaml b/lovelace/cameras/view-camera-03.yaml index db418e6..25fd2c7 100644 --- a/lovelace/cameras/view-camera-03.yaml +++ b/lovelace/cameras/view-camera-03.yaml @@ -145,5 +145,5 @@ card: - type: state-icon entity: binary_sensor.computer_chair_contact_occupied style: - top: 87% - left: 75% + top: 35% + left: 25% diff --git a/lovelace/cameras/view-camera-08.yaml b/lovelace/cameras/view-camera-08.yaml index 49b7cc6..78d4640 100644 --- a/lovelace/cameras/view-camera-08.yaml +++ b/lovelace/cameras/view-camera-08.yaml @@ -42,7 +42,7 @@ card: lazy_load: false dimensions: aspect_ratio_mode: static - aspect_ratio: '16:9' + aspect_ratio: "16:9" elements: - type: image image: /local/title-dark-double.png @@ -79,7 +79,7 @@ card: left: 40% top: 95% - type: state-icon - entity: binary_sensor.white_bed_occupied + entity: input_boolean.white_bed_occupied style: left: 60% top: 95% @@ -129,11 +129,11 @@ card: left: 85% - type: conditional conditions: - - entity: binary_sensor.white_bed_occupied + - entity: input_boolean.white_bed_occupied state: "on" elements: - type: state-icon - entity: binary_sensor.white_bed_occupied + entity: input_boolean.white_bed_occupied style: top: 65% left: 80% diff --git a/lovelace/frigate/view-ai-cam14.yaml b/lovelace/frigate/view-ai-cam14.yaml index 0f9a659..f124aea 100644 --- a/lovelace/frigate/view-ai-cam14.yaml +++ b/lovelace/frigate/view-ai-cam14.yaml @@ -20,8 +20,6 @@ cards: show_state: true columns: 5 entities: - - name: Status - entity: input_text.camera14_status - name: Contrast entity: switch.frigate_cam14_improve_contrast tap_action: diff --git a/lovelace/phone/master-bedroom.yaml b/lovelace/phone/master-bedroom.yaml index d57e93f..90c4dd9 100644 --- a/lovelace/phone/master-bedroom.yaml +++ b/lovelace/phone/master-bedroom.yaml @@ -111,26 +111,14 @@ cards: secondary_info: none - type: horizontal-stack cards: - - type: custom:mushroom-template-card - entity: binary_sensor.master_bed_right_occupied + - type: custom:mushroom-entity-card + entity: input_boolean.master_bed_occupied + name: Bed icon: mdi:bed-king - icon_color: >- - {{ - iif(is_state('binary_sensor.master_bed_right_occupied','on'),'yellow')}} - primary: Bed - double_tap_action: - action: call-service - service: homeassistant.toggle - service_data: {} - target: - entity_id: switch.master_bed_force_occupancy - hold_action: - action: call-service - service: button.press - service_data: {} - target: - entity_id: button.master_bed_manual_tare layout: vertical + secondary_info: none + tap_action: + action: toggle - type: custom:mushroom-entity-card entity: binary_sensor.master_bedroom_window_contact name: Window diff --git a/lovelace/phone/nursery.yaml b/lovelace/phone/nursery.yaml index b5f2d1e..db6dc6e 100644 --- a/lovelace/phone/nursery.yaml +++ b/lovelace/phone/nursery.yaml @@ -177,10 +177,10 @@ cards: cards: - type: custom:mushroom-template-card primary: Emmett - secondary: '{{states(''select.black_bed_wled_preset'')}}' + secondary: "{{states('select.black_bed_wled_preset')}}" entity: select.black_bed_wled_preset icon: mdi:led-strip-variant - icon_color: '{{ iif(is_state(''light.black_bed_wled'', ''on''), ''yellow'') }}' + icon_color: "{{ iif(is_state('light.black_bed_wled', 'on'), 'yellow') }}" tap_action: action: more-info hold_action: @@ -195,10 +195,10 @@ cards: layout: vertical - type: custom:mushroom-template-card primary: Bridget - secondary: '{{states(''select.white_bed_wled_preset'')}}' + secondary: "{{states('select.white_bed_wled_preset')}}" entity: select.white_bed_wled_preset icon: mdi:led-strip-variant - icon_color: '{{ iif(is_state(''light.white_bed_wled'', ''on''), ''yellow'') }}' + icon_color: "{{ iif(is_state('light.white_bed_wled', 'on'), 'yellow') }}" tap_action: action: more-info hold_action: @@ -286,7 +286,7 @@ cards: icon: mdi:sleep - type: custom:mushroom-entity-card entity: media_player.ytube_music_player - name: 'Off' + name: "Off" tap_action: action: call-service service: homeassistant.turn_off @@ -332,10 +332,10 @@ cards: entity_id: button.black_bed_manual_tare layout: vertical # - type: custom:mushroom-template-card - # entity: binary_sensor.white_bed_occupied + # entity: input_boolean.white_bed_occupied # icon: mdi:bed # icon_color: >- - # {% if(is_state('binary_sensor.white_bed_occupied','on')) %} + # {% if(is_state('input_boolean.white_bed_occupied','on')) %} # yellow # {% elif(is_state('binary_sensor.white_bed_hx711_error','on')) %} # red @@ -411,4 +411,4 @@ cards: cards: - type: custom:mushroom-title-card subtitle: Cameras - - !include /config/lovelace/cameras/view-camera-08.yaml \ No newline at end of file + - !include /config/lovelace/cameras/view-camera-08.yaml diff --git a/lovelace/raw-cameras/indoor-camera-card.yaml b/lovelace/raw-cameras/indoor-camera-card.yaml index 1350bd0..07f6f9c 100644 --- a/lovelace/raw-cameras/indoor-camera-card.yaml +++ b/lovelace/raw-cameras/indoor-camera-card.yaml @@ -76,7 +76,7 @@ cameras: occupancy: false motion: false entities: - - binary_sensor.master_bed_right_occupied + - input_boolean.master_bed_occupied timeline: media: snapshots show_recordings: false diff --git a/lovelace/room_cards/master_bedroom.yaml b/lovelace/room_cards/master_bedroom.yaml index 96a19b1..5919c33 100644 --- a/lovelace/room_cards/master_bedroom.yaml +++ b/lovelace/room_cards/master_bedroom.yaml @@ -125,7 +125,7 @@ elements: #button #3 - type: "custom:button-card" color: auto - entity: binary_sensor.master_bed_right_occupied + entity: input_boolean.master_bed_occupied show_name: false style: left: 50% diff --git a/lovelace/view-camera-overview.yaml b/lovelace/view-camera-overview.yaml deleted file mode 100644 index 49ec46e..0000000 --- a/lovelace/view-camera-overview.yaml +++ /dev/null @@ -1,88 +0,0 @@ -title: Cameras -path: camera-overview -icon: mdi:cctv -visible: - - user: 0e789cd7ce194a799def1abc4dd02191 -panel: true -cards: - - type: grid - square: false - columns: 2 - cards: - - type: picture-entity - entity: camera.frigate_cam08 - camera_image: camera.frigate_cam08 - camera_view: live - - - type: picture-entity - entity: camera.frigate_cam12 - camera_image: camera.frigate_cam12 - camera_view: live - - # - type: picture-entity - # entity: camera.amcrest_amcrest_cam02 - # camera_image: camera.amcrest_amcrest_cam02 - # camera_view: live - - # - type: picture-entity - # entity: camera.amcrest_amcrest_cam05 - # camera_image: camera.amcrest_amcrest_cam05 - # camera_view: live - # - - # - type: picture-entity - # entity: camera.amcrest_amcrest_cam09 - # camera_image: camera.amcrest_amcrest_cam09 - # camera_view: live - # - - - type: picture-entity - entity: camera.frigate_cam06 - camera_image: camera.frigate_cam06 - camera_view: live - - - type: picture-entity - entity: camera.frigate_cam07 - camera_image: camera.frigate_cam07 - camera_view: live - - - type: picture-entity - entity: camera.frigate_cam01 - camera_image: camera.frigate_cam01 - camera_view: live - - - type: picture-entity - entity: camera.frigate_cam03 - camera_image: camera.frigate_cam03 - camera_view: live - - - type: picture-entity - entity: camera.frigate_cam04 - camera_image: camera.frigate_cam04 - camera_view: live - - # - type: picture-entity - # entity: camera.amcrest_amcrest_cam10 - # camera_image: camera.amcrest_amcrest_cam10 - # camera_view: live - # - - # - type: picture-entity - # entity: camera.amcrest_amcrest_cam11 - # camera_image: camera.amcrest_amcrest_cam11 - # camera_view: live - - - type: picture-entity - entity: camera.frigate_cam14 - camera_image: camera.frigate_cam14 - camera_view: live - - - type: picture-entity - entity: camera.frigate_cam18 - camera_image: camera.frigate_cam18 - camera_view: live - - - type: picture-entity - entity: camera.frigate_cam19 - camera_image: camera.frigate_cam19 - camera_view: live diff --git a/lovelace/view-ha-floorplan.yaml b/lovelace/view-ha-floorplan.yaml index ee9defb..943dbac 100644 --- a/lovelace/view-ha-floorplan.yaml +++ b/lovelace/view-ha-floorplan.yaml @@ -11,7 +11,7 @@ cards: config: image: /local/floorplan/fullsized_floorplan.svg stylesheet: /local/floorplan/floorplan.css - # log_level: debug + log_level: debug console_log_level: debug defaults: hover_action: hover-info @@ -168,9 +168,10 @@ cards: - entities: - binary_sensor.black_bed_occupied - - binary_sensor.white_bed_occupied - - binary_sensor.master_bed_left_occupied - - binary_sensor.master_bed_right_occupied + - input_boolean.white_bed_occupied + #- binary_sensor.master_bed_left_occupied + #- binary_sensor.master_bed_right_occupied + - input_boolean.master_bed_occupied - binary_sensor.computer_area_person_occupancy - binary_sensor.dining_room_person_occupancy - binary_sensor.entryway_person_occupancy diff --git a/lovelace/view-overview.yaml b/lovelace/view-overview.yaml index 623cb86..1935cbe 100644 --- a/lovelace/view-overview.yaml +++ b/lovelace/view-overview.yaml @@ -1197,24 +1197,27 @@ cards: # - entity: binary_sensor.front_yard_plant_monitor_status # state_filter: # - "off" - - entity: binary_sensor.pm_status - state_filter: - - "off" # - entity: binary_sensor.furnace_room_multisensor_status # state_filter: # - "off" + - entity: binary_sensor.pm_status + state_filter: + - "off" + - entity: binary_sensor.nursery_tagreader_status + state_filter: + - "off" - entity: binary_sensor.nursery_tagreader_status state_filter: - "off" - entity: binary_sensor.black_bed_status state_filter: - "off" - - entity: binary_sensor.white_bed_status - state_filter: - - "off" - - entity: binary_sensor.master_bed_status - state_filter: - - "off" + # - entity: binary_sensor.white_bed_status + # state_filter: + # - "off" + # - entity: binary_sensor.master_bed_status + # state_filter: + # - "off" show_empty: false state_filter: diff --git a/scripts/master_bedroom/wake_up_the_master_bedroom.yaml b/scripts/master_bedroom/wake_up_the_master_bedroom.yaml index 3da8c7e..ab6761c 100644 --- a/scripts/master_bedroom/wake_up_the_master_bedroom.yaml +++ b/scripts/master_bedroom/wake_up_the_master_bedroom.yaml @@ -5,7 +5,7 @@ sequence: - repeat: while: - condition: state - entity_id: binary_sensor.master_bed_right_occupied + entity_id: input_boolean.master_bed_occupied state: "on" sequence: - variables: diff --git a/ui-cameras.yaml b/ui-cameras.yaml index 16a2c13..689c0fd 100644 --- a/ui-cameras.yaml +++ b/ui-cameras.yaml @@ -5,21 +5,18 @@ icon: mdi:cctv views: - !include lovelace/view-surveillance.yaml - !include lovelace/view-cameras.yaml - - !include lovelace/view-camera-overview.yaml - !include lovelace/frigate/view-ai-cam08.yaml - !include lovelace/frigate/view-ai-cam12.yaml - - !include lovelace/frigate/view-ai-cam13.yaml + #- !include lovelace/frigate/view-ai-cam13.yaml + - #- !include lovelace/frigate/view-ai-cam02.yaml - !include lovelace/frigate/view-ai-cam03.yaml - #- !include lovelace/frigate/view-ai-cam05.yaml + - !include lovelace/frigate/view-ai-cam06.yaml - !include lovelace/frigate/view-ai-cam07.yaml - #- !include lovelace/frigate/view-ai-cam09.yaml - #- !include lovelace/frigate/view-ai-cam10.yaml - #- !include lovelace/frigate/view-ai-cam11.yaml + - !include lovelace/frigate/view-ai-cam01.yaml - !include lovelace/frigate/view-ai-cam04.yaml - - !include lovelace/frigate/view-ai-cam14.yaml + #- !include lovelace/frigate/view-ai-cam14.yaml - !include lovelace/frigate/view-ai-cam18.yaml - !include lovelace/frigate/view-ai-cam19.yaml \ No newline at end of file diff --git a/www/floorplan/fullsized_floorplan.svg b/www/floorplan/fullsized_floorplan.svg index ac6a0f2..9d78979 100644 --- a/www/floorplan/fullsized_floorplan.svg +++ b/www/floorplan/fullsized_floorplan.svg @@ -3113,9 +3113,9 @@ + inkscape:label="input_boolean.master_bed_occupied" /> + inkscape:label="input_boolean.white_bed_occupied" />