1
mirror of https://github.com/home-assistant/core synced 2024-10-01 05:30:36 +02:00

Motionblinds improvements (#64698)

* use gateway_mac as identifier

see revieuw request: https://github.com/home-assistant/core/pull/64414#discussion_r787691139

* show hw_version and add interface "0.0.0.0"
This commit is contained in:
starkillerOG 2022-01-23 01:42:23 +01:00 committed by GitHub
parent 8e5a74d9e9
commit a9cefec1db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -164,7 +164,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
device_registry.async_get_or_create(
config_entry_id=entry.entry_id,
connections={(dr.CONNECTION_NETWORK_MAC, motion_gateway.mac)},
identifiers={(DOMAIN, entry.unique_id)},
identifiers={(DOMAIN, motion_gateway.mac)},
manufacturer=MANUFACTURER,
name=entry.title,
model="Wi-Fi bridge",

View File

@ -166,7 +166,7 @@ class MotionBlindsFlowHandler(config_entries.ConfigFlow, domain=DOMAIN):
async def async_get_interfaces(self):
"""Get list of interface to use."""
interfaces = [DEFAULT_INTERFACE]
interfaces = [DEFAULT_INTERFACE, "0.0.0.0"]
enabled_interfaces = []
default_interface = DEFAULT_INTERFACE

View File

@ -145,7 +145,8 @@ class MotionPositionDevice(CoordinatorEntity, CoverEntity):
manufacturer=MANUFACTURER,
model=blind.blind_type,
name=f"{blind.blind_type}-{blind.mac[12:]}",
via_device=(DOMAIN, config_entry.unique_id),
via_device=(DOMAIN, blind._gateway.mac),
hw_version=blind.wireless_name,
)
@property