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:
@@ -13,48 +13,78 @@ sensor:
|
||||
current:
|
||||
name: ${ct19_name} ${amp_label}
|
||||
id: ct19Amps
|
||||
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: ${ct19_name} ${watt_label}
|
||||
id: ct19Watts
|
||||
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_ct19}
|
||||
phase_b:
|
||||
current:
|
||||
name: ${ct20_name} ${amp_label}
|
||||
id: ct20Amps
|
||||
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: ${ct20_name} ${watt_label}
|
||||
id: ct20Watts
|
||||
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_ct20}
|
||||
phase_c:
|
||||
current:
|
||||
name: ${ct21_name} ${amp_label}
|
||||
id: ct21Amps
|
||||
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: ${ct21_name} ${watt_label}
|
||||
id: ct21Watts
|
||||
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_ct21}
|
||||
line_frequency: ${electric_freq}
|
||||
@@ -72,48 +102,78 @@ sensor:
|
||||
current:
|
||||
name: ${ct22_name} ${amp_label}
|
||||
id: ct22Amps
|
||||
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: ${ct22_name} ${watt_label}
|
||||
id: ct22Watts
|
||||
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: 5.0
|
||||
- delta: ${watt_delta_lights}
|
||||
- throttle: ${watt_throttle}
|
||||
gain_voltage: ${voltage_cal2}
|
||||
gain_ct: ${current_cal_ct22}
|
||||
phase_b:
|
||||
current:
|
||||
name: ${ct23_name} ${amp_label}
|
||||
id: ct23Amps
|
||||
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: ${ct23_name} ${watt_label}
|
||||
id: ct23Watts
|
||||
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_ct23}
|
||||
phase_c:
|
||||
current:
|
||||
name: ${ct24_name} ${amp_label}
|
||||
id: ct24Amps
|
||||
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: ${ct24_name} ${watt_label}
|
||||
id: ct24Watts
|
||||
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_ct24}
|
||||
line_frequency: ${electric_freq}
|
||||
@@ -122,25 +182,25 @@ sensor:
|
||||
enable_offset_calibration: ${offset_calibration}
|
||||
enable_gain_calibration: ${gain_calibration}
|
||||
|
||||
#Total A AddOn3
|
||||
- platform: template
|
||||
name: Add-on 3 Total ${amp_label}
|
||||
id: totalAmpsAddOn3
|
||||
lambda: return id(ct19Amps).state + id(ct20Amps).state + id(ct21Amps).state + id(ct22Amps).state + id(ct23Amps).state + id(ct24Amps).state ;
|
||||
accuracy_decimals: 2
|
||||
unit_of_measurement: A
|
||||
device_class: current
|
||||
update_interval: ${update_time}
|
||||
# #Total A AddOn3
|
||||
# - platform: template
|
||||
# name: Add-on 3 Total ${amp_label}
|
||||
# id: totalAmpsAddOn3
|
||||
# lambda: return id(ct19Amps).state + id(ct20Amps).state + id(ct21Amps).state + id(ct22Amps).state + id(ct23Amps).state + id(ct24Amps).state ;
|
||||
# accuracy_decimals: 2
|
||||
# unit_of_measurement: A
|
||||
# device_class: current
|
||||
# update_interval: ${update_time}
|
||||
|
||||
#Total W AddOn3
|
||||
- platform: template
|
||||
name: Add-on 3 Total ${watt_label}
|
||||
id: totalWattsAddOn3
|
||||
lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ;
|
||||
accuracy_decimals: 2
|
||||
unit_of_measurement: W
|
||||
device_class: power
|
||||
update_interval: ${update_time}
|
||||
# #Total W AddOn3
|
||||
# - platform: template
|
||||
# name: Add-on 3 Total ${watt_label}
|
||||
# id: totalWattsAddOn3
|
||||
# lambda: return id(ct19Watts).state + id(ct20Watts).state + id(ct21Watts).state + id(ct22Watts).state + id(ct23Watts).state + id(ct24Watts).state ;
|
||||
# accuracy_decimals: 2
|
||||
# unit_of_measurement: W
|
||||
# device_class: power
|
||||
# update_interval: ${update_time}
|
||||
|
||||
#kWh From CT 19
|
||||
- platform: total_daily_energy
|
||||
@@ -149,6 +209,7 @@ sensor:
|
||||
power_id: ct19Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -160,6 +221,7 @@ sensor:
|
||||
power_id: ct20Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -171,6 +233,7 @@ sensor:
|
||||
power_id: ct21Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -182,6 +245,7 @@ sensor:
|
||||
power_id: ct22Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -193,6 +257,7 @@ sensor:
|
||||
power_id: ct23Watts
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
- throttle: ${kwh_throttle}
|
||||
unit_of_measurement: kWh
|
||||
device_class: energy
|
||||
state_class: total_increasing
|
||||
@@ -204,6 +269,7 @@ sensor:
|
||||
power_id: ct24Watts
|
||||
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