Skip to content

Commit

Permalink
Add support for Pro 3EM-3CT63 (#546)
Browse files Browse the repository at this point in the history
* Add support for Pro 3EM-3CT63

* Update docs

* Bump version
  • Loading branch information
bieniu authored Dec 27, 2024
1 parent ca0ab1f commit 5fd18a0
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Shellies Discovery Gen2 will automatically install/update the script on your She
- Shelly Pro 3
- Shelly Pro 3EM
- Shelly Pro 3EM Switch Add-on
- Shelly Pro 3EM-3CT63
- Shelly Pro 3EM-400
- Shelly Pro 4PM
- Shelly Pro Dimmer 2
Expand Down
1 change: 1 addition & 0 deletions info.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ Shellies Discovery Gen2 will automatically install/update the script on your She
- Shelly Pro 3
- Shelly Pro 3EM
- Shelly Pro 3EM Switch Add-on
- Shelly Pro 3EM-3CT63
- Shelly Pro 3EM-400
- Shelly Pro 4PM
- Shelly Pro Dimmer 2
Expand Down
40 changes: 39 additions & 1 deletion python_scripts/shellies_discovery_gen2.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""This script adds MQTT discovery support for Shellies Gen2 devices."""

VERSION = "3.6.1"
VERSION = "3.7.0"

ATTR_BATTERY_POWERED = "battery_powered"
ATTR_BINARY_SENSORS = "binary_sensors"
Expand Down Expand Up @@ -222,6 +222,7 @@
MODEL_PRO_2PM = "shellypro2pm"
MODEL_PRO_3 = "shellypro3"
MODEL_PRO_3EM = "shellypro3em"
MODEL_PRO_3EM_3CT63 = "shellypro3em63"
MODEL_PRO_3EM_400 = "shellypro3em400"
MODEL_PRO_3EM_MONOPHASE = "shellypro3em-monophase"
MODEL_PRO_4PM = "shellypro4pm"
Expand Down Expand Up @@ -2874,6 +2875,43 @@ def get_component_ids(component: str, config):
},
ATTR_MIN_FIRMWARE_DATE: 20231219,
},
MODEL_PRO_3EM_3CT63: {
ATTR_NAME: "Shelly Pro 3EM-3CT63",
ATTR_MODEL_ID: "SPEM-003CEBEU63",
ATTR_EMETERS: 1,
ATTR_EMETER_PHASES: ["a", "b", "c"],
ATTR_BINARY_SENSORS: {SENSOR_CLOUD: DESCRIPTION_SENSOR_CLOUD},
ATTR_BUTTONS: {BUTTON_RESTART: DESCRIPTION_BUTTON_RESTART},
ATTR_SENSORS: {
SENSOR_ETH_IP: DESCRIPTION_SENSOR_ETH_IP,
SENSOR_LAST_RESTART: DESCRIPTION_SENSOR_LAST_RESTART,
SENSOR_SSID: DESCRIPTION_SENSOR_SSID,
SENSOR_WIFI_IP: DESCRIPTION_SENSOR_WIFI_IP,
SENSOR_WIFI_SIGNAL: DESCRIPTION_SENSOR_WIFI_SIGNAL,
SENSOR_N_CURRENT: DESCRIPTION_SENSOR_N_CURRENT,
SENSOR_DEVICE_TEMPERATURE: DESCRIPTION_SENSOR_DEVICE_TEMPERATURE,
SENSOR_TOTAL_CURRENT: DESCRIPTION_SENSOR_TOTAL_CURRENT,
SENSOR_TOTAL_ACTIVE_POWER: DESCRIPTION_SENSOR_EMETER_TOTAL_ACTIVE_POWER,
SENSOR_TOTAL_APPARENT_POWER: DESCRIPTION_SENSOR_EMETER_TOTAL_APPARENT_POWER,
SENSOR_TOTAL_ACTIVE_ENERGY: DESCRIPTION_SENSOR_EMETER0_TOTAL_ACTIVE_ENERGY,
SENSOR_TOTAT_ACTIVE_RETURNED_ENERGY: DESCRIPTION_SENSOR_EMETER0_TOTAL_ACTIVE_RETURNED_ENERGY,
},
ATTR_EMETER_SENSORS: {
SENSOR_ACTIVE_POWER: DESCRIPTION_SENSOR_EMETER_PHASE_ACTIVE_POWER,
SENSOR_APPARENT_POWER: DESCRIPTION_SENSOR_EMETER_PHASE_APPARENT_POWER,
SENSOR_CURRENT: DESCRIPTION_SENSOR_EMETER_PHASE_CURRENT,
SENSOR_POWER_FACTOR: DESCRIPTION_SENSOR_EMETER_PHASE_POWER_FACTOR,
SENSOR_TOTAL_ACTIVE_ENERGY: DESCRIPTION_SENSOR_EMETER_PHASE_TOTAL_ACTIVE_ENERGY,
SENSOR_TOTAT_ACTIVE_RETURNED_ENERGY: DESCRIPTION_SENSOR_EMETER_PHASE_TOTAL_ACTIVE_RETURNED_ENERGY,
SENSOR_VOLTAGE: DESCRIPTION_SENSOR_EMETER_PHASE_VOLTAGE,
SENSOR_FREQUENCY: DESCRIPTION_SENSOR_EMETER_PHASE_FREQUENCY,
},
ATTR_UPDATES: {
UPDATE_FIRMWARE: DESCRIPTION_UPDATE_FIRMWARE,
UPDATE_FIRMWARE_BETA: DESCRIPTION_UPDATE_FIRMWARE_BETA,
},
ATTR_MIN_FIRMWARE_DATE: 20241011,
},
MODEL_PRO_3EM_400: {
ATTR_NAME: "Shelly Pro 3EM-400",
ATTR_MODEL_ID: "SPEM-003CEBEU400",
Expand Down

0 comments on commit 5fd18a0

Please sign in to comment.