Skip to content

Commit

Permalink
Support DeviceInfo.model_id (#595)
Browse files Browse the repository at this point in the history
  • Loading branch information
bieniu authored Aug 30, 2024
1 parent 753b2c3 commit 4462651
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hacs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Shellies Discovery",
"homeassistant": "2024.1.0b0",
"homeassistant": "2024.9.0b0",
"zip_release": true,
"filename": "shellies-discovery.zip"
}
6 changes: 4 additions & 2 deletions python_scripts/shellies_discovery.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""This script adds MQTT discovery support for Shellies devices."""

VERSION = "5.1.0"
VERSION = "5.2.0"

ATTR_ICON = "icon"
ATTR_MANUFACTURER = "Allterco Robotics"
Expand Down Expand Up @@ -157,6 +157,7 @@
KEY_MODE_STATE_TEMPLATE = "mode_stat_tpl"
KEY_MODE_STATE_TOPIC = "mode_stat_t"
KEY_MODEL = "mdl"
KEY_MODEL_ID = "mdl_id"
KEY_MODES = "modes"
KEY_NAME = "name"
KEY_OFF_DELAY = "off_dly"
Expand Down Expand Up @@ -2431,8 +2432,9 @@ def mqtt_publish(topic, payload, retain, json=False):
KEY_CONNECTIONS: [[KEY_MAC, format_mac(mac)]],
KEY_NAME: device_name,
KEY_MODEL: model,
KEY_MODEL_ID: model_id,
KEY_SW_VERSION: fw_ver,
KEY_HW_VERSION: f"gen1 ({model_id})",
KEY_HW_VERSION: "gen1",
KEY_MANUFACTURER: ATTR_MANUFACTURER,
KEY_CONFIGURATION_URL: f"http://{host}/",
}
Expand Down

0 comments on commit 4462651

Please sign in to comment.