mirror of
https://github.com/CeeWeasel/fresh-home.git
synced 2026-08-10 02:50:12 -04:00
Added some themes, but mostly updated power monitor to better wrangle the sensors and udpate_intervals to save DB space
This commit is contained in:
@@ -12,48 +12,78 @@ sensor:
|
||||
current:
|
||||
name: ${ct13_name} ${amp_label}
|
||||
id: ct13Amps
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: ${amp_accuracy_decimals}
|
||||
filters:
|
||||
# Drop noise below 0.02A, then log 0.05A changes or every 60s
|
||||
- lambda: "return x < 0.02 ? 0 : x;"
|
||||
- or:
|
||||
- delta: ${amp_delta}
|
||||
- throttle: ${amp_throttle}
|
||||
power:
|
||||
name: ${ct13_name} ${watt_label}
|
||||
id: ct13Watts
|
||||
accuracy_decimals: 1
|
||||
filters:
|
||||
- lambda: |-
|
||||
if (x < 0) return x * -1;
|
||||
return x;
|
||||
# Convert negative to positive (absolute value)
|
||||
- lambda: "return abs(x);"
|
||||
# Clip "ghost" watts when the device is off
|
||||
- lambda: "return x < 5.0 ? 0 : x;"
|
||||
- or:
|
||||
- throttle: 60s
|
||||
- delta: 2.0
|
||||
- delta: ${watt_delta_lights}
|
||||
- throttle: ${watt_throttle}
|
||||
gain_voltage: ${voltage_cal1}
|
||||
gain_ct: ${current_cal_ct13}
|
||||
phase_b:
|
||||
current:
|
||||
name: ${ct14_name} ${amp_label}
|
||||
id: ct14Amps
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: ${amp_accuracy_decimals}
|
||||
filters:
|
||||
# Drop noise below 0.02A, then log 0.05A changes or every 60s
|
||||
- lambda: "return x < 0.02 ? 0 : x;"
|
||||
- or:
|
||||
- delta: ${amp_delta}
|
||||
- throttle: ${amp_throttle}
|
||||
power:
|
||||
name: ${ct14_name} ${watt_label}
|
||||
id: ct14Watts
|
||||
accuracy_decimals: 1
|
||||
filters:
|
||||
- lambda: |-
|
||||
if (x < 0) return x * -1;
|
||||
return x;
|
||||
# Convert negative to positive (absolute value)
|
||||
- lambda: "return abs(x);"
|
||||
# Clip "ghost" watts when the device is off
|
||||
- lambda: "return x < 5.0 ? 0 : x;"
|
||||
- or:
|
||||
- throttle: 60s
|
||||
- delta: 2.0
|
||||
- delta: ${watt_delta_lights}
|
||||
- throttle: ${watt_throttle}
|
||||
gain_voltage: ${voltage_cal1}
|
||||
gain_ct: ${current_cal_ct14}
|
||||
phase_c:
|
||||
current:
|
||||
name: ${ct15_name} ${amp_label}
|
||||
id: ct15Amps
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: ${amp_accuracy_decimals}
|
||||
filters:
|
||||
# Drop noise below 0.02A, then log 0.05A changes or every 60s
|
||||
- lambda: "return x < 0.02 ? 0 : x;"
|
||||
- or:
|
||||
- delta: ${amp_delta}
|
||||
- throttle: ${amp_throttle}
|
||||
power:
|
||||
name: ${ct15_name} ${watt_label}
|
||||
id: ct15Watts
|
||||
accuracy_decimals: 1
|
||||
filters:
|
||||
- lambda: |-
|
||||
if (x < 0) return x * -1;
|
||||
return x;
|
||||
# Convert negative to positive (absolute value)
|
||||
- lambda: "return abs(x);"
|
||||
# Clip "ghost" watts when the device is off
|
||||
- lambda: "return x < 5.0 ? 0 : x;"
|
||||
- or:
|
||||
- throttle: 60s
|
||||
- delta: 2.0
|
||||
- delta: ${watt_delta_lights}
|
||||
- throttle: ${watt_throttle}
|
||||
gain_voltage: ${voltage_cal1}
|
||||
gain_ct: ${current_cal_ct15}
|
||||
line_frequency: ${electric_freq}
|
||||
@@ -71,48 +101,78 @@ sensor:
|
||||
current:
|
||||
name: ${ct16_name} ${amp_label}
|
||||
id: ct16Amps
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: ${amp_accuracy_decimals}
|
||||
filters:
|
||||
# Drop noise below 0.02A, then log 0.05A changes or every 60s
|
||||
- lambda: "return x < 0.02 ? 0 : x;"
|
||||
- or:
|
||||
- delta: ${amp_delta}
|
||||
- throttle: ${amp_throttle}
|
||||
power:
|
||||
name: ${ct16_name} ${watt_label}
|
||||
id: ct16Watts
|
||||
accuracy_decimals: 1
|
||||
filters:
|
||||
- lambda: |-
|
||||
if (x < 0) return x * -1;
|
||||
return x;
|
||||
# Convert negative to positive (absolute value)
|
||||
- lambda: "return abs(x);"
|
||||
# Clip "ghost" watts when the device is off
|
||||
- lambda: "return x < 5.0 ? 0 : x;"
|
||||
- or:
|
||||
- throttle: 60s
|
||||
- delta: 2.0
|
||||
- delta: ${watt_delta_lights}
|
||||
- throttle: ${watt_throttle}
|
||||
gain_voltage: ${voltage_cal2}
|
||||
gain_ct: ${current_cal_ct16}
|
||||
phase_b:
|
||||
current:
|
||||
name: ${ct17_name} ${amp_label}
|
||||
id: ct17Amps
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: ${amp_accuracy_decimals}
|
||||
filters:
|
||||
# Drop noise below 0.02A, then log 0.05A changes or every 60s
|
||||
- lambda: "return x < 0.02 ? 0 : x;"
|
||||
- or:
|
||||
- delta: ${amp_delta}
|
||||
- throttle: ${amp_throttle}
|
||||
power:
|
||||
name: ${ct17_name} ${watt_label}
|
||||
id: ct17Watts
|
||||
accuracy_decimals: 1
|
||||
filters:
|
||||
- lambda: |-
|
||||
if (x < 0) return x * -1;
|
||||
return x;
|
||||
# Convert negative to positive (absolute value)
|
||||
- lambda: "return abs(x);"
|
||||
# Clip "ghost" watts when the device is off
|
||||
- lambda: "return x < 5.0 ? 0 : x;"
|
||||
- or:
|
||||
- throttle: 60s
|
||||
- delta: 2.0
|
||||
- delta: ${watt_delta_lights}
|
||||
- throttle: ${watt_throttle}
|
||||
gain_voltage: ${voltage_cal2}
|
||||
gain_ct: ${current_cal_ct17}
|
||||
phase_c:
|
||||
current:
|
||||
name: ${ct18_name} ${amp_label}
|
||||
id: ct18Amps
|
||||
entity_category: diagnostic
|
||||
accuracy_decimals: ${amp_accuracy_decimals}
|
||||
filters:
|
||||
# Drop noise below 0.02A, then log 0.05A changes or every 60s
|
||||
- lambda: "return x < 0.02 ? 0 : x;"
|
||||
- or:
|
||||
- delta: ${amp_delta}
|
||||
- throttle: ${amp_throttle}
|
||||
power:
|
||||
name: ${ct18_name} ${watt_label}
|
||||
id: ct18Watts
|
||||
accuracy_decimals: 1
|
||||
filters:
|
||||
- lambda: |-
|
||||
if (x < 0) return x * -1;
|
||||
return x;
|
||||
# Convert negative to positive (absolute value)
|
||||
- lambda: "return abs(x);"
|
||||
# Clip "ghost" watts when the device is off
|
||||
- lambda: "return x < 5.0 ? 0 : x;"
|
||||
- or:
|
||||
- throttle: 60s
|
||||
- delta: 2.0
|
||||
- delta: ${watt_delta_lights}
|
||||
- throttle: ${watt_throttle}
|
||||
gain_voltage: ${voltage_cal2}
|
||||
gain_ct: ${current_cal_ct18}
|
||||
line_frequency: ${electric_freq}
|
||||
@@ -121,25 +181,25 @@ sensor:
|
||||
enable_offset_calibration: ${offset_calibration}
|
||||
enable_gain_calibration: ${gain_calibration}
|
||||
|
||||
#Total A AddOn2
|
||||
- platform: template
|
||||
name: Add-on 2 Total ${amp_label}
|
||||
id: totalAmpsAddOn2
|
||||
lambda: return id(ct13Amps).state + id(ct14Amps).state + id(ct15Amps).state + id(ct16Amps).state + id(ct17Amps).state + id(ct18Amps).state ;
|
||||
accuracy_decimals: 2
|
||||
unit_of_measurement: A
|
||||
device_class: current
|
||||
update_interval: ${update_time}
|
||||
# #Total A AddOn2
|
||||
# - platform: template
|
||||
# name: Add-on 2 Total ${amp_label}
|
||||
# id: totalAmpsAddOn2
|
||||
# lambda: return id(ct13Amps).state + id(ct14Amps).state + id(ct15Amps).state + id(ct16Amps).state + id(ct17Amps).state + id(ct18Amps).state ;
|
||||
# accuracy_decimals: 2
|
||||
# unit_of_measurement: A
|
||||
# device_class: current
|
||||
# update_interval: ${update_time}
|
||||
|
||||
#Total W AddOn2
|
||||
- platform: template
|
||||
name: Add-on 2 Total ${watt_label}
|
||||
id: totalWattsAddOn2
|
||||
lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ;
|
||||
accuracy_decimals: 2
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
# #Total W AddOn2
|
||||
# - platform: template
|
||||
# name: Add-on 2 Total ${watt_label}
|
||||
# id: totalWattsAddOn2
|
||||
# lambda: return id(ct13Watts).state + id(ct14Watts).state + id(ct15Watts).state + id(ct16Watts).state + id(ct17Watts).state + id(ct18Watts).state ;
|
||||
# accuracy_decimals: 2
|
||||
# unit_of_measurement: W
|
||||
# device_class: power
|
||||
# update_interval: ${update_time}
|
||||
|
||||
#kWh From CT 13
|
||||
- platform: total_daily_energy
|
||||
@@ -148,6 +208,7 @@ sensor:
|
||||
power_id: ct13Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -159,6 +220,7 @@ sensor:
|
||||
power_id: ct14Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -170,6 +232,7 @@ sensor:
|
||||
power_id: ct15Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -181,6 +244,7 @@ sensor:
|
||||
power_id: ct16Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -192,6 +256,7 @@ sensor:
|
||||
power_id: ct17Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -203,6 +268,7 @@ sensor:
|
||||
power_id: ct18Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
Reference in New Issue
Block a user