Skip to content

Commit

Permalink
Support DeviceInfo.model_id (#452)
Browse files Browse the repository at this point in the history
  • Loading branch information
bieniu authored Aug 30, 2024
1 parent 6394be1 commit 28bc5e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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 Gen2",
"homeassistant": "2023.9.0b0",
"homeassistant": "2024.9.0b0",
"zip_release": true,
"filename": "shellies-discovery-gen2.zip"
}
4 changes: 3 additions & 1 deletion python_scripts/shellies_discovery_gen2.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
KEY_MAC = "mac"
KEY_MANUFACTURER = "mf"
KEY_MODEL = "mdl"
KEY_MODEL_ID = "mdl_id"
KEY_NAME = "name"
KEY_ORIGIN = "o"
KEY_PAYLOAD = "pl"
Expand Down Expand Up @@ -3586,8 +3587,9 @@ def remove_old_script_versions(device_topic, script_topic):
KEY_CONNECTIONS: [[KEY_MAC, format_mac(mac)]],
KEY_NAME: device_name,
KEY_MODEL: SUPPORTED_MODELS[model][ATTR_NAME],
KEY_MODEL_ID: SUPPORTED_MODELS[model].get(ATTR_MODEL_ID),
KEY_SW_VERSION: firmware_id,
KEY_HW_VERSION: f"gen{gen} ({SUPPORTED_MODELS[model].get(ATTR_MODEL_ID)})",
KEY_HW_VERSION: f"gen{gen}",
KEY_MANUFACTURER: ATTR_MANUFACTURER,
KEY_CONFIGURATION_URL: device_url,
}
Expand Down

0 comments on commit 28bc5e8

Please sign in to comment.