Replies: 1 comment
-
I set up current sensors doing something like this:
phases:
- id: phase_a
input: RED
calibration: 0.022
voltage:
name: "Phase A Voltage"
id: phase_a_voltage # <-- make sure this is set to something
filters: [*pos, *moving_avg]
.defaultfilters:
- ¤t_min
# Throttle to ≈3s but take the max, since I personally care about the highest current measured in a given timeframe
# if you don't want max, change `max` to `sliding_window_moving_average` to get an average of the last ≈3 seconds
max:
window_size: 6
send_every: 6
- ¤t_max
or:
- delta: 0.1
- throttle: 60s
ct_clamps:
- { phase_id: phase_a, input: "A", power: { id: power_phase_a, filters: [*pos, *calibrate], internal: true } } # Total Phase A Power
- { phase_id: phase_b, input: "B", power: { id: power_phase_b, filters: [*pos, *calibrate], internal: true } } # Total Phase B Power
# Calculate current for each circuit
- platform: template
# name: "Phase A Current"
id: current_phase_a
lambda: return id(power_phase_a).state / id(phase_a_voltage).state;
update_interval: 0.48s
unit_of_measurement: "A"
device_class: current
internal: true
- platform: template
# name: "Phase B Current"
id: current_phase_b
lambda: return id(power_phase_b).state / id(phase_b_voltage).state;
update_interval: 0.48s
unit_of_measurement: "A"
device_class: current
internal: true
- platform: template
# name: "Total Home Current"
id: current_home_total
lambda: return id(current_phase_a).state + id(current_phase_b).state;
update_interval: 0.48s
unit_of_measurement: "A"
device_class: current
internal: true
# External-facing current entities
- { platform: copy, name: "Phase A Current", source_id: current_phase_a, filters: [ *current_min, *current_max ] }
- { platform: copy, name: "Phase B Current", source_id: current_phase_b, filters: [ *current_min, *current_max ] }
- { platform: copy, name: "Total Home Current", source_id: current_home_total, filters: [ *current_min, *current_max ] } |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
Have any had succes adding these 3 readings to their configuration?
Best regards
Martin.
Beta Was this translation helpful? Give feedback.
All reactions