mirror of
https://github.com/home-assistant/core.git
synced 2025-09-06 21:31:34 +02:00
Add model_id to Philips Hue (#150499)
This commit is contained in:
committed by
GitHub
parent
ca290ee631
commit
614bf96fb9
@@ -77,7 +77,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: HueConfigEntry) -> bool:
|
||||
identifiers={(DOMAIN, api.config.bridge_id)},
|
||||
manufacturer="Signify",
|
||||
name=api.config.name,
|
||||
model=api.config.model_id,
|
||||
model_id=api.config.model_id,
|
||||
sw_version=api.config.software_version,
|
||||
)
|
||||
# create persistent notification if we found a bridge version with security vulnerability
|
||||
@@ -105,7 +105,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: HueConfigEntry) -> bool:
|
||||
},
|
||||
manufacturer=api.config.bridge_device.product_data.manufacturer_name,
|
||||
name=api.config.name,
|
||||
model=api.config.model_id,
|
||||
model_id=api.config.model_id,
|
||||
sw_version=api.config.software_version,
|
||||
)
|
||||
|
||||
|
@@ -15,6 +15,7 @@ from homeassistant.const import (
|
||||
ATTR_IDENTIFIERS,
|
||||
ATTR_MANUFACTURER,
|
||||
ATTR_MODEL,
|
||||
ATTR_MODEL_ID,
|
||||
ATTR_NAME,
|
||||
ATTR_SUGGESTED_AREA,
|
||||
ATTR_SW_VERSION,
|
||||
@@ -55,12 +56,12 @@ async def async_setup_devices(bridge: HueBridge):
|
||||
else None,
|
||||
)
|
||||
# Register a Hue device resource as device in HA device registry.
|
||||
model = f"{hue_resource.product_data.product_name} ({hue_resource.product_data.model_id})"
|
||||
params = {
|
||||
ATTR_IDENTIFIERS: {(DOMAIN, hue_resource.id)},
|
||||
ATTR_SW_VERSION: hue_resource.product_data.software_version,
|
||||
ATTR_NAME: hue_resource.metadata.name,
|
||||
ATTR_MODEL: model,
|
||||
ATTR_MODEL: hue_resource.product_data.product_name,
|
||||
ATTR_MODEL_ID: hue_resource.product_data.model_id,
|
||||
ATTR_MANUFACTURER: hue_resource.product_data.manufacturer_name,
|
||||
}
|
||||
if room := dev_controller.get_room(hue_resource.id):
|
||||
|
Reference in New Issue
Block a user