mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Drop unnecessary async definitions in samsungtv (#72019)
* Drop unnecessary async definitions in samsungtv * keep prefix
This commit is contained in:
parent
bcabe5c6e4
commit
8eb4a16a0f
@ -414,7 +414,8 @@ class SamsungTVConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
)
|
)
|
||||||
return entry
|
return entry
|
||||||
|
|
||||||
async def _async_start_discovery_with_mac_address(self) -> None:
|
@callback
|
||||||
|
def _async_start_discovery_with_mac_address(self) -> None:
|
||||||
"""Start discovery."""
|
"""Start discovery."""
|
||||||
assert self._host is not None
|
assert self._host is not None
|
||||||
if (entry := self._async_update_existing_matching_entry()) and entry.unique_id:
|
if (entry := self._async_update_existing_matching_entry()) and entry.unique_id:
|
||||||
@ -491,7 +492,7 @@ class SamsungTVConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
LOGGER.debug("Samsung device found via DHCP: %s", discovery_info)
|
LOGGER.debug("Samsung device found via DHCP: %s", discovery_info)
|
||||||
self._mac = discovery_info.macaddress
|
self._mac = discovery_info.macaddress
|
||||||
self._host = discovery_info.ip
|
self._host = discovery_info.ip
|
||||||
await self._async_start_discovery_with_mac_address()
|
self._async_start_discovery_with_mac_address()
|
||||||
await self._async_set_device_unique_id()
|
await self._async_set_device_unique_id()
|
||||||
self.context["title_placeholders"] = {"device": self._title}
|
self.context["title_placeholders"] = {"device": self._title}
|
||||||
return await self.async_step_confirm()
|
return await self.async_step_confirm()
|
||||||
@ -503,7 +504,7 @@ class SamsungTVConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
|||||||
LOGGER.debug("Samsung device found via ZEROCONF: %s", discovery_info)
|
LOGGER.debug("Samsung device found via ZEROCONF: %s", discovery_info)
|
||||||
self._mac = format_mac(discovery_info.properties["deviceid"])
|
self._mac = format_mac(discovery_info.properties["deviceid"])
|
||||||
self._host = discovery_info.host
|
self._host = discovery_info.host
|
||||||
await self._async_start_discovery_with_mac_address()
|
self._async_start_discovery_with_mac_address()
|
||||||
await self._async_set_device_unique_id()
|
await self._async_set_device_unique_id()
|
||||||
self.context["title_placeholders"] = {"device": self._title}
|
self.context["title_placeholders"] = {"device": self._title}
|
||||||
return await self.async_step_confirm()
|
return await self.async_step_confirm()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user