Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESPHome: Add suggested_area from device info #102834

Merged
merged 1 commit into from Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions homeassistant/components/esphome/manager.py
Expand Up @@ -596,6 +596,10 @@ def _async_setup_device_registry(
model = project_name[1]
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_entry = device_registry.async_get_or_create(
config_entry_id=entry.entry_id,
Expand All @@ -606,6 +610,7 @@ def _async_setup_device_registry(
model=model,
sw_version=sw_version,
hw_version=hw_version,
suggested_area=suggested_area,
)
return device_entry.id

Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/esphome/manifest.json
Expand Up @@ -16,7 +16,7 @@
"loggers": ["aioesphomeapi", "noiseprotocol"],
"requirements": [
"async-interrupt==1.1.1",
"aioesphomeapi==18.1.0",
"aioesphomeapi==18.2.0",
"bluetooth-data-tools==1.13.0",
"esphome-dashboard-api==1.2.3"
],
Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Expand Up @@ -237,7 +237,7 @@ aioecowitt==2023.5.0
aioemonitor==1.0.5

# homeassistant.components.esphome
aioesphomeapi==18.1.0
aioesphomeapi==18.2.0

# homeassistant.components.flo
aioflo==2021.11.0
Expand Down
2 changes: 1 addition & 1 deletion requirements_test_all.txt
Expand Up @@ -218,7 +218,7 @@ aioecowitt==2023.5.0
aioemonitor==1.0.5

# homeassistant.components.esphome
aioesphomeapi==18.1.0
aioesphomeapi==18.2.0

# homeassistant.components.flo
aioflo==2021.11.0
Expand Down