mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Address Wake on Lan post-merge feedback (#122549)
Address Wake on Late post-merge feedback
This commit is contained in:
parent
fcccd85ac4
commit
59637d2391
@ -25,7 +25,7 @@ async def async_setup_entry(
|
||||
entry: ConfigEntry,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up the Wake on LAN sensor entry."""
|
||||
"""Set up the Wake on LAN button entry."""
|
||||
broadcast_address: str | None = entry.options.get(CONF_BROADCAST_ADDRESS)
|
||||
broadcast_port: int | None = entry.options.get(CONF_BROADCAST_PORT)
|
||||
mac_address: str = entry.options[CONF_MAC]
|
||||
@ -33,7 +33,7 @@ async def async_setup_entry(
|
||||
|
||||
async_add_entities(
|
||||
[
|
||||
WolSwitch(
|
||||
WolButton(
|
||||
name,
|
||||
mac_address,
|
||||
broadcast_address,
|
||||
@ -43,7 +43,7 @@ async def async_setup_entry(
|
||||
)
|
||||
|
||||
|
||||
class WolSwitch(ButtonEntity):
|
||||
class WolButton(ButtonEntity):
|
||||
"""Representation of a wake on lan button."""
|
||||
|
||||
_attr_name = None
|
||||
|
@ -68,8 +68,8 @@ OPTIONS_FLOW = {
|
||||
}
|
||||
|
||||
|
||||
class StatisticsConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
|
||||
"""Handle a config flow for Statistics."""
|
||||
class WakeonLanConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
|
||||
"""Handle a config flow for Wake on Lan."""
|
||||
|
||||
config_flow = CONFIG_FLOW
|
||||
options_flow = OPTIONS_FLOW
|
||||
|
Loading…
x
Reference in New Issue
Block a user