mirror of
https://github.com/home-assistant/core.git
synced 2025-04-28 11:17:53 +00:00
ESPHome: Add suggested_area from device info (#102834)
This commit is contained in:
parent
aa67542ef8
commit
4838b2dee6
@ -596,6 +596,10 @@ def _async_setup_device_registry(
|
|||||||
model = project_name[1]
|
model = project_name[1]
|
||||||
hw_version = device_info.project_version
|
hw_version = device_info.project_version
|
||||||
|
|
||||||
|
suggested_area = None
|
||||||
|
if device_info.suggested_area:
|
||||||
|
suggested_area = device_info.suggested_area
|
||||||
|
|
||||||
device_registry = dr.async_get(hass)
|
device_registry = dr.async_get(hass)
|
||||||
device_entry = device_registry.async_get_or_create(
|
device_entry = device_registry.async_get_or_create(
|
||||||
config_entry_id=entry.entry_id,
|
config_entry_id=entry.entry_id,
|
||||||
@ -606,6 +610,7 @@ def _async_setup_device_registry(
|
|||||||
model=model,
|
model=model,
|
||||||
sw_version=sw_version,
|
sw_version=sw_version,
|
||||||
hw_version=hw_version,
|
hw_version=hw_version,
|
||||||
|
suggested_area=suggested_area,
|
||||||
)
|
)
|
||||||
return device_entry.id
|
return device_entry.id
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
"loggers": ["aioesphomeapi", "noiseprotocol"],
|
"loggers": ["aioesphomeapi", "noiseprotocol"],
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"async-interrupt==1.1.1",
|
"async-interrupt==1.1.1",
|
||||||
"aioesphomeapi==18.1.0",
|
"aioesphomeapi==18.2.0",
|
||||||
"bluetooth-data-tools==1.13.0",
|
"bluetooth-data-tools==1.13.0",
|
||||||
"esphome-dashboard-api==1.2.3"
|
"esphome-dashboard-api==1.2.3"
|
||||||
],
|
],
|
||||||
|
@ -237,7 +237,7 @@ aioecowitt==2023.5.0
|
|||||||
aioemonitor==1.0.5
|
aioemonitor==1.0.5
|
||||||
|
|
||||||
# homeassistant.components.esphome
|
# homeassistant.components.esphome
|
||||||
aioesphomeapi==18.1.0
|
aioesphomeapi==18.2.0
|
||||||
|
|
||||||
# homeassistant.components.flo
|
# homeassistant.components.flo
|
||||||
aioflo==2021.11.0
|
aioflo==2021.11.0
|
||||||
|
@ -218,7 +218,7 @@ aioecowitt==2023.5.0
|
|||||||
aioemonitor==1.0.5
|
aioemonitor==1.0.5
|
||||||
|
|
||||||
# homeassistant.components.esphome
|
# homeassistant.components.esphome
|
||||||
aioesphomeapi==18.1.0
|
aioesphomeapi==18.2.0
|
||||||
|
|
||||||
# homeassistant.components.flo
|
# homeassistant.components.flo
|
||||||
aioflo==2021.11.0
|
aioflo==2021.11.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user