Skip to content

Commit

Permalink
Add support for Shelly I4 Gen3 (#422)
Browse files Browse the repository at this point in the history
* Add support for Shelly I4 Gen3

* Update docs

---------

Co-authored-by: Maciej Bieniek <[email protected]>
  • Loading branch information
bieniu and bieniu authored Jun 13, 2024
1 parent 89a8586 commit 7d15054
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 4 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ Shellies Discovery Gen2 will automatically install/update the script on your She

- Shelly 1 Gen3
- Shelly 1PM Gen3
- Shelly 1 Mini Gen3
- Shelly 1PM Mini Gen3
- Shelly H&T Gen3
- Shelly I4 Gen3
- Shelly PM Mini Gen3
- Shelly Plus 1
- Shelly Plus 1 Mini
- Shelly Plus 1PM
Expand All @@ -47,7 +51,6 @@ Shellies Discovery Gen2 will automatically install/update the script on your She
- Shelly Plus RGBW PM (RGBW profile is not supported)
- Shelly Plus Smoke
- Shelly Plus Wall Dimmer
- Shelly PM Gen3
- Shelly Pro 1
- Shelly Pro 1PM
- Shelly Pro 2
Expand Down
7 changes: 5 additions & 2 deletions info.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ Shellies Discovery Gen2 will automatically install/update the script on your She

- Shelly 1 Gen3
- Shelly 1PM Gen3
- Shelly 1 Mini Gen3
- Shelly 1PM Mini Gen3
- Shelly H&T Gen3
- Shelly I4 Gen3
- Shelly PM Mini Gen3
- Shelly Plus 1
- Shelly Plus 1 Mini
- Shelly Plus 1PM
Expand All @@ -37,10 +41,9 @@ Shellies Discovery Gen2 will automatically install/update the script on your She
- Shelly Plus Plug UK
- Shelly Plus Plug US
- Shelly Plus PM Mini
- Shelly Plus RGBW PM (RGBW profile is not supported)
- Shelly Plus Smoke
- Shelly Plus Wall Dimmer
- Shelly Plus RGBW PM (RGBW profile is not supported)
- Shelly PM Gen3
- Shelly Pro 1
- Shelly Pro 1PM
- Shelly Pro 2
Expand Down
33 changes: 32 additions & 1 deletion python_scripts/shellies_discovery_gen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@
MODEL_1_MINI_G3 = "shelly1minig3"
MODEL_1PM_MINI_G3 = "shelly1pmminig3"
MODEL_HT_G3 = "shellyhtg3"
MODEL_I4_G3 = "shellyi4g3"
MODEL_PM_MINI_G3 = "shellypmminig3"

SENSOR_ACTIVE_POWER = "active_power"
Expand Down Expand Up @@ -1282,6 +1283,7 @@
MODEL_1_G3: {
ATTR_NAME: "Shelly 1 Gen3",
ATTR_MODEL_ID: "S3SW-001X16EU",
ATTR_GEN: 3,
ATTR_BINARY_SENSORS: {SENSOR_CLOUD: DESCRIPTION_SENSOR_CLOUD},
ATTR_BUTTONS: {BUTTON_RESTART: DESCRIPTION_BUTTON_RESTART},
ATTR_INPUTS: 1,
Expand Down Expand Up @@ -1314,6 +1316,7 @@
MODEL_1PM_G3: {
ATTR_NAME: "Shelly 1PM Gen3",
ATTR_MODEL_ID: "S3SW-001P16EU",
ATTR_GEN: 3,
ATTR_BINARY_SENSORS: {SENSOR_CLOUD: DESCRIPTION_SENSOR_CLOUD},
ATTR_BUTTONS: {BUTTON_RESTART: DESCRIPTION_BUTTON_RESTART},
ATTR_INPUTS: 1,
Expand Down Expand Up @@ -1354,7 +1357,7 @@
},
MODEL_HT_G3: {
ATTR_BATTERY_POWERED: True,
ATTR_NAME: "Shelly H&T G3",
ATTR_NAME: "Shelly H&T Gen3",
ATTR_MODEL_ID: "S3SN-0U12A",
ATTR_GEN: 3,
ATTR_BINARY_SENSORS: {
Expand All @@ -1374,6 +1377,34 @@
ATTR_MIN_FIRMWARE_DATE: 20230803,
ATTR_WAKEUP_PERIOD: 7200,
},
MODEL_I4_G3: {
ATTR_NAME: "Shelly I4 Gen3",
ATTR_MODEL_ID: "S3SN-0024X",
ATTR_GEN: 3,
ATTR_BINARY_SENSORS: {SENSOR_CLOUD: DESCRIPTION_SENSOR_CLOUD},
ATTR_BUTTONS: {BUTTON_RESTART: DESCRIPTION_BUTTON_RESTART},
ATTR_INPUTS: 4,
ATTR_INPUT_BINARY_SENSORS: {SENSOR_INPUT: DESCRIPTION_SENSOR_INPUT},
ATTR_INPUT_EVENTS: [
EVENT_BUTTON_DOWN,
EVENT_BUTTON_UP,
EVENT_DOUBLE_PUSH,
EVENT_LONG_PUSH,
EVENT_SINGLE_PUSH,
EVENT_TRIPLE_PUSH,
],
ATTR_SENSORS: {
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,
},
ATTR_UPDATES: {
UPDATE_FIRMWARE: DESCRIPTION_UPDATE_FIRMWARE,
UPDATE_FIRMWARE_BETA: DESCRIPTION_UPDATE_FIRMWARE_BETA,
},
ATTR_MIN_FIRMWARE_DATE: 20240331,
},
MODEL_PLUS_1: {
ATTR_NAME: "Shelly Plus 1",
ATTR_MODEL_ID: "SNSW-001X16EU",
Expand Down

0 comments on commit 7d15054

Please sign in to comment.