mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Add node firmware to ozw device registry (#38330)
This commit is contained in:
parent
39e6bca682
commit
988d3e9373
@ -114,7 +114,6 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||
|
||||
# Filter out CommandClasses we're definitely not interested in.
|
||||
if value.command_class in [
|
||||
CommandClass.VERSION,
|
||||
CommandClass.MANUFACTURER_SPECIFIC,
|
||||
]:
|
||||
return
|
||||
|
@ -7,6 +7,8 @@ from openzwavemqtt.const import (
|
||||
EVENT_INSTANCE_STATUS_CHANGED,
|
||||
EVENT_VALUE_CHANGED,
|
||||
OZW_READY_STATES,
|
||||
CommandClass,
|
||||
ValueIndex,
|
||||
)
|
||||
from openzwavemqtt.models.node import OZWNode
|
||||
from openzwavemqtt.models.value import OZWValue
|
||||
@ -182,12 +184,18 @@ class ZWaveDeviceEntity(Entity):
|
||||
node = self.values.primary.node
|
||||
node_instance = self.values.primary.instance
|
||||
dev_id = create_device_id(node, self.values.primary.instance)
|
||||
node_firmware = node.get_value(
|
||||
CommandClass.VERSION, ValueIndex.VERSION_APPLICATION
|
||||
)
|
||||
device_info = {
|
||||
"identifiers": {(DOMAIN, dev_id)},
|
||||
"name": create_device_name(node),
|
||||
"manufacturer": node.node_manufacturer_name,
|
||||
"model": node.node_product_name,
|
||||
}
|
||||
if node_firmware is not None:
|
||||
device_info["sw_version"] = node_firmware.value
|
||||
|
||||
# device with multiple instances is split up into virtual devices for each instance
|
||||
if node_instance > 1:
|
||||
parent_dev_id = create_device_id(node)
|
||||
|
@ -4,7 +4,7 @@
|
||||
"config_flow": true,
|
||||
"documentation": "https://www.home-assistant.io/integrations/ozw",
|
||||
"requirements": [
|
||||
"python-openzwave-mqtt==1.0.2"
|
||||
"python-openzwave-mqtt==1.0.4"
|
||||
],
|
||||
"after_dependencies": [
|
||||
"mqtt"
|
||||
|
@ -1734,7 +1734,7 @@ python-nest==4.1.0
|
||||
python-nmap==0.6.1
|
||||
|
||||
# homeassistant.components.ozw
|
||||
python-openzwave-mqtt==1.0.2
|
||||
python-openzwave-mqtt==1.0.4
|
||||
|
||||
# homeassistant.components.qbittorrent
|
||||
python-qbittorrent==0.4.1
|
||||
|
@ -791,7 +791,7 @@ python-miio==0.5.3
|
||||
python-nest==4.1.0
|
||||
|
||||
# homeassistant.components.ozw
|
||||
python-openzwave-mqtt==1.0.2
|
||||
python-openzwave-mqtt==1.0.4
|
||||
|
||||
# homeassistant.components.songpal
|
||||
python-songpal==0.12
|
||||
|
Loading…
x
Reference in New Issue
Block a user