Skip to content

Commit

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

* Fix model

---------

Co-authored-by: Maciej Bieniek <[email protected]>
  • Loading branch information
bieniu and bieniu authored Jun 13, 2024
1 parent f48fc2b commit 82caa24
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions python_scripts/shellies_discovery_gen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@
MODEL_PRO_EM = "shellyproem50"
MODEL_WALL_DISPLAY = "ShellyWallDisplay"
# Gen3 devices
MODEL_1_G3 = "shelly1g3"
MODEL_1_MINI_G3 = "shelly1minig3"
MODEL_1PM_MINI_G3 = "shelly1pmminig3"
MODEL_HT_G3 = "shellyhtg3"
Expand Down Expand Up @@ -1277,6 +1278,38 @@
}

SUPPORTED_MODELS = {
MODEL_1_G3: {
ATTR_NAME: "Shelly 1 Gen3",
ATTR_MODEL_ID: "S3SW-001X16EU",
ATTR_BINARY_SENSORS: {SENSOR_CLOUD: DESCRIPTION_SENSOR_CLOUD},
ATTR_BUTTONS: {BUTTON_RESTART: DESCRIPTION_BUTTON_RESTART},
ATTR_INPUTS: 1,
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_RELAYS: 1,
ATTR_RELAY_SENSORS: {
SENSOR_TEMPERATURE: DESCRIPTION_SENSOR_RELAY_TEMPERATURE_STATUS
},
ATTR_RELAY_BINARY_SENSORS: {SENSOR_OVERTEMP: DESCRIPTION_SENSOR_OVERTEMP},
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_HT_G3: {
ATTR_BATTERY_POWERED: True,
ATTR_NAME: "Shelly H&T G3",
Expand Down

0 comments on commit 82caa24

Please sign in to comment.