Refactor bed occupancy sensors and related automations

- Updated nursery automation to use input booleans for bed occupancy instead of binary sensors.
- Changed conditions in nursery automation to improve readability and consistency.
- Modified binary sensor configurations for master bedroom and nursery to use input booleans.
- Removed unused input number configurations related to master bed load cells.
- Updated UI configurations to reflect changes in entity types from binary sensors to input booleans.
- Cleaned up camera view configurations and adjusted styles for better layout.
- Removed deprecated master bed YAML configuration and archived it for future reference.
- Enhanced ESPHome configurations for white and black beds, including improved logging and diagnostics.
This commit is contained in:
CeeWeasel
2025-07-19 13:37:45 -04:00
parent a533240fc3
commit 4e0e55ac3c
49 changed files with 605 additions and 890 deletions
+67 -16
View File
@@ -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
+19 -1
View File
@@ -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
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
+2
View File
@@ -1,5 +1,7 @@
esphome:
name: ${devicename}
comment: ${comment}
friendly_name: ${friendly_name}
# platform: ${platform}
# board: ${board}
@@ -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
+1
View File
@@ -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
+1
View File
@@ -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
-78
View File
@@ -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