Adjust DeviceInfo registration on zwave_js (#58391)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
b3f6be0cec
commit
ef48238ac3
2 changed files with 1 additions and 4 deletions
|
@ -18,7 +18,6 @@ from zwave_js_server.model.value import Value, ValueNotification
|
||||||
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
from homeassistant.components.sensor import DOMAIN as SENSOR_DOMAIN
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
ATTR_CONFIG_ENTRY_ID,
|
|
||||||
ATTR_DEVICE_ID,
|
ATTR_DEVICE_ID,
|
||||||
ATTR_DOMAIN,
|
ATTR_DOMAIN,
|
||||||
ATTR_ENTITY_ID,
|
ATTR_ENTITY_ID,
|
||||||
|
@ -127,7 +126,6 @@ def register_node_in_dev_reg(
|
||||||
):
|
):
|
||||||
remove_device_func(device)
|
remove_device_func(device)
|
||||||
params = {
|
params = {
|
||||||
ATTR_CONFIG_ENTRY_ID: entry.entry_id,
|
|
||||||
ATTR_IDENTIFIERS: {device_id},
|
ATTR_IDENTIFIERS: {device_id},
|
||||||
ATTR_SW_VERSION: node.firmware_version,
|
ATTR_SW_VERSION: node.firmware_version,
|
||||||
ATTR_NAME: node.name
|
ATTR_NAME: node.name
|
||||||
|
@ -138,7 +136,7 @@ def register_node_in_dev_reg(
|
||||||
}
|
}
|
||||||
if node.location:
|
if node.location:
|
||||||
params[ATTR_SUGGESTED_AREA] = node.location
|
params[ATTR_SUGGESTED_AREA] = node.location
|
||||||
device = dev_reg.async_get_or_create(**params)
|
device = dev_reg.async_get_or_create(config_entry_id=entry.entry_id, **params)
|
||||||
|
|
||||||
async_dispatcher_send(hass, EVENT_DEVICE_ADDED_TO_REGISTRY, device)
|
async_dispatcher_send(hass, EVENT_DEVICE_ADDED_TO_REGISTRY, device)
|
||||||
|
|
||||||
|
|
|
@ -352,7 +352,6 @@ ATTR_LOCATION: Final = "location"
|
||||||
|
|
||||||
ATTR_MODE: Final = "mode"
|
ATTR_MODE: Final = "mode"
|
||||||
|
|
||||||
ATTR_CONFIG_ENTRY_ID: Final = "config_entry_id"
|
|
||||||
ATTR_CONFIGURATION_URL: Final = "configuration_url"
|
ATTR_CONFIGURATION_URL: Final = "configuration_url"
|
||||||
ATTR_CONNECTIONS: Final = "connections"
|
ATTR_CONNECTIONS: Final = "connections"
|
||||||
ATTR_MANUFACTURER: Final = "manufacturer"
|
ATTR_MANUFACTURER: Final = "manufacturer"
|
||||||
|
|
Loading…
Add table
Reference in a new issue