Update ipem-six-c5-single-phase-six-channel.yaml

This commit is contained in:
Dave Williams | DitroniX | G8PUO
2026-06-20 18:42:52 +01:00
parent 2ec07dc6e8
commit b9706da0e2
@@ -48,7 +48,7 @@ esp32:
substitutions: substitutions:
author: "DitroniX - Dave Williams" author: "DitroniX - Dave Williams"
firmware_version: "1.00.01" firmware_version: "1.00.02"
release_date: "2026-06-20" release_date: "2026-06-20"
board_name: "IPEM SIX" board_name: "IPEM SIX"
board_mcu: "ESP32-C5" board_mcu: "ESP32-C5"
@@ -63,9 +63,10 @@ substitutions:
# =============================================================== # ===============================================================
# ======================== BOARD CONFIG =========================== # ======================== BOARD CONFIG ===========================
Phases: 1 # Baseline of this version of firmware. For later use. phases_inputs: 1 # Baseline of this version of firmware. For later use.
Current_Inputs: 6 # Baseline of this version of firmware. For later use. current_inputs: 6 # Baseline of this version of firmware. For later use.
Current_Type: "CT" # Baseline of this version of firmware. For later use. CT / Rogowski current_type:
"CT" # Baseline of this version of firmware. For later use. CT / Rogowski
# =============================================================== # ===============================================================
# ==================== ATM90E32 Registers ======================== # ==================== ATM90E32 Registers ========================
@@ -74,6 +75,11 @@ substitutions:
gain_pga_baseline: 2X # Baseline for CT gain_pga_baseline: 2X # Baseline for CT
# =============================================================== # ===============================================================
# ========================= MISC ================================
tmp102_name: "Board Temperature"
tmp102_update_interval: 30s
# ===============================================================
project: project:
name: "ditronix.ipem_six" name: "ditronix.ipem_six"
version: "${firmware_version}" version: "${firmware_version}"
@@ -112,6 +118,7 @@ spi:
# ===================================================== # =====================================================
i2c: i2c:
id: i2c_bus
sda: GPIO2 sda: GPIO2
scl: GPIO3 scl: GPIO3
frequency: 400kHz frequency: 400kHz
@@ -193,6 +200,7 @@ light:
if(step > 20) if(step > 20)
step = 0; step = 0;
################################## NUMBER ##################################
# ===================================================== # =====================================================
# USER ADJUSTMENTS # USER ADJUSTMENTS
# ===================================================== # =====================================================
@@ -225,6 +233,8 @@ number:
restore_value: true restore_value: true
initial_value: 10 initial_value: 10
################################## TEXT SENSOR ##################################
text_sensor: text_sensor:
# ===================================================== # =====================================================
# IPEM SIX FIRMWARE METADATA # IPEM SIX FIRMWARE METADATA
@@ -258,7 +268,7 @@ text_sensor:
name: "Board MCU" name: "Board MCU"
entity_category: diagnostic entity_category: diagnostic
lambda: |- lambda: |-
return {"${variant}"}; return {"${board_mcu}"};
- platform: template - platform: template
name: "Board Build" name: "Board Build"
@@ -303,14 +313,14 @@ text_sensor:
update_interval: 60s update_interval: 60s
lambda: |- lambda: |-
std::string config = "${phases_config}"; std::string config = "${phases_inputs}";
if (config == "1") { if (config == "1") {
return {"Single"}; return {"Single"};
} else if (config == "2") { } else if (config == "2") {
return {"Split"}; return {"Split/Dual (1+3)"};
} else if (config == "3") { } else if (config == "3") {
return {"3-Phase"}; return {"3-Phase (3)"};
} }
return {"Unknown"}; return {"Unknown"};
@@ -318,13 +328,13 @@ text_sensor:
name: "Current Inputs" name: "Current Inputs"
entity_category: diagnostic entity_category: diagnostic
lambda: |- lambda: |-
return {"${Current_Inputs}"}; return {"${current_inputs}"};
- platform: template - platform: template
name: "Current Type" name: "Current Type"
entity_category: diagnostic entity_category: diagnostic
lambda: |- lambda: |-
return {"${Current_Type}"}; return {"${current_type}"};
# ===================================================== # =====================================================
# IPEM SIX CHANNEL METADATA # IPEM SIX CHANNEL METADATA
@@ -611,19 +621,59 @@ text_sensor:
return {"Idle"}; return {"Idle"};
# ===================================================== - platform: template
# SENSORS name: "${tmp102_name} Status"
# ===================================================== icon: mdi:thermometer
entity_category: diagnostic
lambda: |-
float t = id(tmp102_temp_c).state;
if (t < 0) return {"Very Cold"};
if (t < 15) return {"Cold"};
if (t < 30) return {"Normal"};
if (t < 45) return {"Warm"};
return {"Hot"};
update_interval: 30s
################################## SENSOR ##################################
sensor: sensor:
# ===================================================== # ================================================================================
# TMP102 # TMP102 PCB Board Ambient Temperature - Will always be warmer than actual Ambient
# ===================================================== # ================================================================================
- platform: tmp102 - platform: tmp102
name: "IPEM SIX Internal Temperature" name: "${tmp102_name} °C"
id: tmp102_temp_c
i2c_id: i2c_bus
address: 0x4A # As used in your Arduino code
update_interval: ${tmp102_update_interval}
accuracy_decimals: 2
device_class: "temperature"
state_class: "measurement"
unit_of_measurement: "°C"
icon: "mdi:thermometer"
filters:
- sliding_window_moving_average:
window_size: 5
send_every: 3
- platform: tmp102
name: "${tmp102_name} °F"
id: tmp102_temp_f
i2c_id: i2c_bus
address: 0x4A address: 0x4A
update_interval: 10s update_interval: ${tmp102_update_interval}
accuracy_decimals: 1
device_class: "temperature"
state_class: "measurement"
unit_of_measurement: "°F"
icon: "mdi:thermometer"
filters:
- lambda: |-
return x * 1.8 + 32.0;
- sliding_window_moving_average:
window_size: 5
send_every: 3
# ===================================================== # =====================================================
# BANK A # BANK A