Skip to content

Commit

Permalink
Add support for DALI Dimmer Gen3 (#511)
Browse files Browse the repository at this point in the history
* Add support for DALI Dimmer Gen3

* Bump version
  • Loading branch information
bieniu authored Nov 3, 2024
1 parent 392de42 commit e39bb00
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Shellies Discovery Gen2 will automatically install/update the script on your She
- Shelly BLU H&T (via Shelly Pro or Gen3 device)
- Shelly BLU Motion (via Shelly Pro or Gen3 device)
- Shelly BLU TRV (via Shelly BLU Gateway Gen3)
- Shelly DALI Dimmer Gen3
- Shelly Dimmer 0/1-10V PM Gen3
- Shelly H&T Gen3
- Shelly i4 Gen3
Expand Down
1 change: 1 addition & 0 deletions info.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ Shellies Discovery Gen2 will automatically install/update the script on your She
- Shelly BLU H&T (via Shelly Pro or Gen3 device)
- Shelly BLU Motion (via Shelly Pro or Gen3 device)
- Shelly BLU TRV (via Shelly BLU Gateway Gen3)
- Shelly DALI Dimmer Gen3
- Shelly Dimmer 0/1-10V PM Gen3
- Shelly H&T Gen3
- Shelly i4 Gen3
Expand Down
31 changes: 30 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.4.0"
VERSION = "3.5.0"

ATTR_BATTERY_POWERED = "battery_powered"
ATTR_BINARY_SENSORS = "binary_sensors"
Expand Down Expand Up @@ -242,6 +242,7 @@
MODEL_I4_G3 = "shellyi4g3"
MODEL_PLUG_S_G3 = "shellyplugsg3"
MODEL_PM_MINI_G3 = "shellypmminig3"
MODEL_DALI_DIMMER_G3 = "shellyddimmerg3"
MODEL_DIMMER_10V_G3 = "shelly0110dimg3"
MODEL_X_MOD1 = "shellyxmod1"
# BLU devices
Expand Down Expand Up @@ -1668,6 +1669,34 @@ def get_component_number(component: str, config) -> int:
},
ATTR_MIN_FIRMWARE_DATE: 20240331,
},
MODEL_DALI_DIMMER_G3: {
ATTR_NAME: "Shelly DALI Dimmer Gen3",
ATTR_MODEL_ID: "S3DM-0A1WW",
ATTR_GEN: 3,
ATTR_BINARY_SENSORS: {SENSOR_CLOUD: DESCRIPTION_SENSOR_CLOUD},
ATTR_BUTTONS: {BUTTON_RESTART: DESCRIPTION_BUTTON_RESTART},
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_LIGHT_SENSORS: {SENSOR_TEMPERATURE: DESCRIPTION_SENSOR_LIGHT_TEMPERATURE},
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: 20240813,
},
MODEL_DIMMER_10V_G3: {
ATTR_NAME: "Shelly Dimmer 0/1-10V PM Gen3",
ATTR_MODEL_ID: "S3DM-0010WW",
Expand Down

0 comments on commit e39bb00

Please sign in to comment.