diff --git a/.gitignore b/.gitignore index 312bace..ab77e6a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ watchman_report.txt .ha_run.lock backup_config.yaml +.cache/ .storage/ .cloud/ .automatic/ diff --git a/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml b/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml index 0e60287..a92fe56 100644 --- a/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml +++ b/automations/rooms/master_bedroom/master_bedroom_lights_to_on.yaml @@ -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: diff --git a/components/packages/databases.yaml b/components/packages/databases.yaml index 1d22810..e60d6ff 100644 --- a/components/packages/databases.yaml +++ b/components/packages/databases.yaml @@ -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 diff --git a/esphome/black-bed.yaml b/esphome/black-bed.yaml index 9f6890e..387611f 100644 --- a/esphome/black-bed.yaml +++ b/esphome/black-bed.yaml @@ -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 diff --git a/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml b/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml index 5db2418..2a1aaa5 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon1.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon1.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} diff --git a/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml b/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml index 00466b7..d186051 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon2.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon2.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_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} diff --git a/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml b/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml index 9fe91fe..76089e1 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_addon3.yaml @@ -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} diff --git a/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml b/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml index 9ddc01e..e296d58 100644 --- a/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml +++ b/esphome/circuit-setup/meter_sensors/6chan_main_sensor.yaml @@ -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 diff --git a/esphome/common/hx711_single_verbose.yaml b/esphome/common/hx711_single_verbose.yaml index 780cbce..f8fc198 100644 --- a/esphome/common/hx711_single_verbose.yaml +++ b/esphome/common/hx711_single_verbose.yaml @@ -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 diff --git a/esphome/power-monitor.yaml b/esphome/power-monitor.yaml index 24dec72..9b619de 100644 --- a/esphome/power-monitor.yaml +++ b/esphome/power-monitor.yaml @@ -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,