quieting down the power meter, eventually going to clean up the database and testing new lighting automation for bedroom

This commit is contained in:
CeeWeasel
2026-03-11 20:13:01 -04:00
parent 105fb7cf86
commit a272421a33
10 changed files with 126 additions and 15 deletions
+1
View File
@@ -15,6 +15,7 @@ watchman_report.txt
.ha_run.lock
backup_config.yaml
.cache/
.storage/
.cloud/
.automatic/
@@ -23,7 +23,9 @@ trigger:
- platform: state
id: occupied
entity_id: binary_sensor.bedroom_occupied
entity_id:
- binary_sensor.bedroom_occupied
- input_boolean.bedroom_occupied
to: "on"
# - platform: state
@@ -87,6 +89,32 @@ action:
action: homeassistant.turn_on
target:
entity_id: "{{ switch_name }}"
- choose:
- alias: "If the room is set to adaptive, turn all adaptive switches on "
conditions:
- alias: "Room set to adaptive"
condition: state
entity_id: input_select.master_bedroom_mode
state: Adaptive
sequence:
- action: switch.turn_on
target:
entity_id:
- switch.adaptive_lighting_bedroom
- switch.adaptive_lighting_adapt_brightness_bedroom
- switch.adaptive_lighting_adapt_color_bedroom
- action: switch.turn_off
target:
entity_id: switch.adaptive_lighting_sleep_mode_bedroom
default:
- action: switch.turn_off
target:
entity_id:
- switch.adaptive_lighting_bedroom
- switch.adaptive_lighting_adapt_brightness_bedroom
- switch.adaptive_lighting_adapt_color_bedroom
- choose:
- alias: "If the room is set to manual, just turn the lights on"
conditions:
+1 -1
View File
@@ -16,7 +16,7 @@ recorder:
#db_url: !secret recorder_url_nas
db_max_retries: 10
db_retry_wait: 3
#commit_interval: 1
commit_interval: 1
exclude:
entities:
- sensor.date
+4 -4
View File
@@ -14,10 +14,10 @@ substitutions:
# Enable logging
logger:
level: DEBUG
logs:
sensor: INFO
hx711: INFO
# level: DEBUG
# logs:
# sensor: INFO
# hx711: INFO
packages:
wifi: !include common/wifi.yaml
@@ -19,6 +19,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct7}
phase_b:
@@ -32,6 +35,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct8}
phase_c:
@@ -45,6 +51,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct9}
line_frequency: ${electric_freq}
@@ -69,6 +78,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct10}
phase_b:
@@ -82,6 +94,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct11}
phase_c:
@@ -95,6 +110,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct12}
line_frequency: ${electric_freq}
@@ -19,6 +19,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct13}
phase_b:
@@ -32,6 +35,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct14}
phase_c:
@@ -45,6 +51,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct15}
line_frequency: ${electric_freq}
@@ -69,6 +78,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct16}
phase_b:
@@ -82,6 +94,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct17}
phase_c:
@@ -95,6 +110,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct18}
line_frequency: ${electric_freq}
@@ -20,6 +20,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct19}
phase_b:
@@ -33,6 +36,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct20}
phase_c:
@@ -46,6 +52,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct21}
line_frequency: ${electric_freq}
@@ -70,6 +79,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 5.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct22}
phase_b:
@@ -83,6 +95,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct23}
phase_c:
@@ -96,6 +111,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct24}
line_frequency: ${electric_freq}
@@ -24,6 +24,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct1}
phase_b:
@@ -37,6 +40,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct2}
phase_c:
@@ -50,6 +56,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal1}
gain_ct: ${current_cal_ct3}
frequency:
@@ -83,6 +92,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct4}
phase_b:
@@ -96,6 +108,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct5}
phase_c:
@@ -109,6 +124,9 @@ sensor:
- lambda: |-
if (x < 0) return x * -1;
return x;
- or:
- throttle: 60s
- delta: 2.0
gain_voltage: ${voltage_cal2}
gain_ct: ${current_cal_ct6}
#this is only needed if monitoring 2 voltages
+9
View File
@@ -33,6 +33,10 @@ sensor:
unit_of_measurement: w
update_interval: 1s
state_class: measurement
filters:
- or:
- throttle: 60s
- delta: 1000
- platform: template
name: "Auto Tare"
@@ -41,9 +45,14 @@ sensor:
unit_of_measurement: w
update_interval: 1s
state_class: measurement
filters:
- or:
- throttle: 60s
- delta: 1000
- platform: template
name: "Initial Zero"
internal: true
lambda: |-
return id(initial_zero);
unit_of_measurement: w
+10 -9
View File
@@ -21,7 +21,8 @@ substitutions:
static_ip: !secret power-monitor-ip
platform: ESP32
board: nodemcu-32s
update_time: 500ms
#update_time: 500ms
update_time: 5s
kwh_report_interval: 60s
watt_heartbeat: 60s
throttle_time: 60s
@@ -188,28 +189,28 @@ packages:
#main_offset: !include circuit-setup/calibration/6chan_main_offset_calibrations.yaml
addon1: !include circuit-setup/meter_sensors/6chan_addon1.yaml
addon1_status: !include circuit-setup/status_fields/6chan_addon1_status.yaml
# addon1_status: !include circuit-setup/status_fields/6chan_addon1_status.yaml
# addon1_cal: !include circuit-setup/calibration/6chan_addon1_calibration.yaml
# addon1_offset: !include circuit-setup/calibration/6chan_addon1_offset_calibrations.yaml
addon2: !include circuit-setup/meter_sensors/6chan_addon2.yaml
addon2_status: !include circuit-setup/status_fields/6chan_addon2_status.yaml
# addon2_status: !include circuit-setup/status_fields/6chan_addon2_status.yaml
# addon2_cal: !include circuit-setup/calibration/6chan_addon2_calibration.yaml
# addon2_offset: !include circuit-setup/calibration/6chan_addon2_offset_calibrations.yaml
addon3: !include circuit-setup/meter_sensors/6chan_addon3.yaml
addon3_status: !include circuit-setup/status_fields/6chan_addon3_status.yaml
# addon3_status: !include circuit-setup/status_fields/6chan_addon3_status.yaml
# addon3_cal: !include circuit-setup/calibration/6chan_addon3_calibration.yaml
# addon3_offset: !include circuit-setup/calibration/6chan_addon3_offset_calibrations.yaml
# web_server:
# port: 80
text_sensor:
- id: !extend ${addon3_id1}
phase_status:
phase_a:
internal: true
# text_sensor:
# - id: !extend ${addon3_id1}
# phase_status:
# phase_a:
# internal: true
sensor:
## The max value for current that the meter can output is 65.535. If you expect to measure current over 65A,