mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-09 10:30:14 -04:00
quieting down the power meter, eventually going to clean up the database and testing new lighting automation for bedroom
This commit is contained in:
@@ -15,6 +15,7 @@ watchman_report.txt
|
|||||||
.ha_run.lock
|
.ha_run.lock
|
||||||
backup_config.yaml
|
backup_config.yaml
|
||||||
|
|
||||||
|
.cache/
|
||||||
.storage/
|
.storage/
|
||||||
.cloud/
|
.cloud/
|
||||||
.automatic/
|
.automatic/
|
||||||
|
|||||||
@@ -23,7 +23,9 @@ trigger:
|
|||||||
|
|
||||||
- platform: state
|
- platform: state
|
||||||
id: occupied
|
id: occupied
|
||||||
entity_id: binary_sensor.bedroom_occupied
|
entity_id:
|
||||||
|
- binary_sensor.bedroom_occupied
|
||||||
|
- input_boolean.bedroom_occupied
|
||||||
to: "on"
|
to: "on"
|
||||||
|
|
||||||
# - platform: state
|
# - platform: state
|
||||||
@@ -87,6 +89,32 @@ action:
|
|||||||
action: homeassistant.turn_on
|
action: homeassistant.turn_on
|
||||||
target:
|
target:
|
||||||
entity_id: "{{ switch_name }}"
|
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:
|
- choose:
|
||||||
- alias: "If the room is set to manual, just turn the lights on"
|
- alias: "If the room is set to manual, just turn the lights on"
|
||||||
conditions:
|
conditions:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ recorder:
|
|||||||
#db_url: !secret recorder_url_nas
|
#db_url: !secret recorder_url_nas
|
||||||
db_max_retries: 10
|
db_max_retries: 10
|
||||||
db_retry_wait: 3
|
db_retry_wait: 3
|
||||||
#commit_interval: 1
|
commit_interval: 1
|
||||||
exclude:
|
exclude:
|
||||||
entities:
|
entities:
|
||||||
- sensor.date
|
- sensor.date
|
||||||
|
|||||||
@@ -14,10 +14,10 @@ substitutions:
|
|||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
logger:
|
logger:
|
||||||
level: DEBUG
|
# level: DEBUG
|
||||||
logs:
|
# logs:
|
||||||
sensor: INFO
|
# sensor: INFO
|
||||||
hx711: INFO
|
# hx711: INFO
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
wifi: !include common/wifi.yaml
|
wifi: !include common/wifi.yaml
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct7}
|
gain_ct: ${current_cal_ct7}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -32,6 +35,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct8}
|
gain_ct: ${current_cal_ct8}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -45,6 +51,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct9}
|
gain_ct: ${current_cal_ct9}
|
||||||
line_frequency: ${electric_freq}
|
line_frequency: ${electric_freq}
|
||||||
@@ -69,6 +78,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct10}
|
gain_ct: ${current_cal_ct10}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -82,6 +94,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct11}
|
gain_ct: ${current_cal_ct11}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -95,6 +110,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct12}
|
gain_ct: ${current_cal_ct12}
|
||||||
line_frequency: ${electric_freq}
|
line_frequency: ${electric_freq}
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct13}
|
gain_ct: ${current_cal_ct13}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -32,6 +35,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct14}
|
gain_ct: ${current_cal_ct14}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -45,6 +51,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct15}
|
gain_ct: ${current_cal_ct15}
|
||||||
line_frequency: ${electric_freq}
|
line_frequency: ${electric_freq}
|
||||||
@@ -69,6 +78,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct16}
|
gain_ct: ${current_cal_ct16}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -82,6 +94,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct17}
|
gain_ct: ${current_cal_ct17}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -95,6 +110,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct18}
|
gain_ct: ${current_cal_ct18}
|
||||||
line_frequency: ${electric_freq}
|
line_frequency: ${electric_freq}
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct19}
|
gain_ct: ${current_cal_ct19}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -33,6 +36,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct20}
|
gain_ct: ${current_cal_ct20}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -46,6 +52,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct21}
|
gain_ct: ${current_cal_ct21}
|
||||||
line_frequency: ${electric_freq}
|
line_frequency: ${electric_freq}
|
||||||
@@ -70,6 +79,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 5.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct22}
|
gain_ct: ${current_cal_ct22}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -83,6 +95,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct23}
|
gain_ct: ${current_cal_ct23}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -96,6 +111,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct24}
|
gain_ct: ${current_cal_ct24}
|
||||||
line_frequency: ${electric_freq}
|
line_frequency: ${electric_freq}
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct1}
|
gain_ct: ${current_cal_ct1}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -37,6 +40,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct2}
|
gain_ct: ${current_cal_ct2}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -50,6 +56,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal1}
|
gain_voltage: ${voltage_cal1}
|
||||||
gain_ct: ${current_cal_ct3}
|
gain_ct: ${current_cal_ct3}
|
||||||
frequency:
|
frequency:
|
||||||
@@ -83,6 +92,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct4}
|
gain_ct: ${current_cal_ct4}
|
||||||
phase_b:
|
phase_b:
|
||||||
@@ -96,6 +108,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct5}
|
gain_ct: ${current_cal_ct5}
|
||||||
phase_c:
|
phase_c:
|
||||||
@@ -109,6 +124,9 @@ sensor:
|
|||||||
- lambda: |-
|
- lambda: |-
|
||||||
if (x < 0) return x * -1;
|
if (x < 0) return x * -1;
|
||||||
return x;
|
return x;
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 2.0
|
||||||
gain_voltage: ${voltage_cal2}
|
gain_voltage: ${voltage_cal2}
|
||||||
gain_ct: ${current_cal_ct6}
|
gain_ct: ${current_cal_ct6}
|
||||||
#this is only needed if monitoring 2 voltages
|
#this is only needed if monitoring 2 voltages
|
||||||
|
|||||||
@@ -33,6 +33,10 @@ sensor:
|
|||||||
unit_of_measurement: w
|
unit_of_measurement: w
|
||||||
update_interval: 1s
|
update_interval: 1s
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
|
filters:
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 1000
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Auto Tare"
|
name: "Auto Tare"
|
||||||
@@ -41,9 +45,14 @@ sensor:
|
|||||||
unit_of_measurement: w
|
unit_of_measurement: w
|
||||||
update_interval: 1s
|
update_interval: 1s
|
||||||
state_class: measurement
|
state_class: measurement
|
||||||
|
filters:
|
||||||
|
- or:
|
||||||
|
- throttle: 60s
|
||||||
|
- delta: 1000
|
||||||
|
|
||||||
- platform: template
|
- platform: template
|
||||||
name: "Initial Zero"
|
name: "Initial Zero"
|
||||||
|
internal: true
|
||||||
lambda: |-
|
lambda: |-
|
||||||
return id(initial_zero);
|
return id(initial_zero);
|
||||||
unit_of_measurement: w
|
unit_of_measurement: w
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ substitutions:
|
|||||||
static_ip: !secret power-monitor-ip
|
static_ip: !secret power-monitor-ip
|
||||||
platform: ESP32
|
platform: ESP32
|
||||||
board: nodemcu-32s
|
board: nodemcu-32s
|
||||||
update_time: 500ms
|
#update_time: 500ms
|
||||||
|
update_time: 5s
|
||||||
kwh_report_interval: 60s
|
kwh_report_interval: 60s
|
||||||
watt_heartbeat: 60s
|
watt_heartbeat: 60s
|
||||||
throttle_time: 60s
|
throttle_time: 60s
|
||||||
@@ -188,28 +189,28 @@ packages:
|
|||||||
#main_offset: !include circuit-setup/calibration/6chan_main_offset_calibrations.yaml
|
#main_offset: !include circuit-setup/calibration/6chan_main_offset_calibrations.yaml
|
||||||
|
|
||||||
addon1: !include circuit-setup/meter_sensors/6chan_addon1.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_cal: !include circuit-setup/calibration/6chan_addon1_calibration.yaml
|
||||||
# addon1_offset: !include circuit-setup/calibration/6chan_addon1_offset_calibrations.yaml
|
# addon1_offset: !include circuit-setup/calibration/6chan_addon1_offset_calibrations.yaml
|
||||||
|
|
||||||
addon2: !include circuit-setup/meter_sensors/6chan_addon2.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_cal: !include circuit-setup/calibration/6chan_addon2_calibration.yaml
|
||||||
# addon2_offset: !include circuit-setup/calibration/6chan_addon2_offset_calibrations.yaml
|
# addon2_offset: !include circuit-setup/calibration/6chan_addon2_offset_calibrations.yaml
|
||||||
|
|
||||||
addon3: !include circuit-setup/meter_sensors/6chan_addon3.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_cal: !include circuit-setup/calibration/6chan_addon3_calibration.yaml
|
||||||
# addon3_offset: !include circuit-setup/calibration/6chan_addon3_offset_calibrations.yaml
|
# addon3_offset: !include circuit-setup/calibration/6chan_addon3_offset_calibrations.yaml
|
||||||
|
|
||||||
# web_server:
|
# web_server:
|
||||||
# port: 80
|
# port: 80
|
||||||
|
|
||||||
text_sensor:
|
# text_sensor:
|
||||||
- id: !extend ${addon3_id1}
|
# - id: !extend ${addon3_id1}
|
||||||
phase_status:
|
# phase_status:
|
||||||
phase_a:
|
# phase_a:
|
||||||
internal: true
|
# internal: true
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
## The max value for current that the meter can output is 65.535. If you expect to measure current over 65A,
|
## The max value for current that the meter can output is 65.535. If you expect to measure current over 65A,
|
||||||
|
|||||||
Reference in New Issue
Block a user