mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +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,
|
entry: ConfigEntry,
|
||||||
async_add_entities: AddEntitiesCallback,
|
async_add_entities: AddEntitiesCallback,
|
||||||
) -> None:
|
) -> 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_address: str | None = entry.options.get(CONF_BROADCAST_ADDRESS)
|
||||||
broadcast_port: int | None = entry.options.get(CONF_BROADCAST_PORT)
|
broadcast_port: int | None = entry.options.get(CONF_BROADCAST_PORT)
|
||||||
mac_address: str = entry.options[CONF_MAC]
|
mac_address: str = entry.options[CONF_MAC]
|
||||||
@ -33,7 +33,7 @@ async def async_setup_entry(
|
|||||||
|
|
||||||
async_add_entities(
|
async_add_entities(
|
||||||
[
|
[
|
||||||
WolSwitch(
|
WolButton(
|
||||||
name,
|
name,
|
||||||
mac_address,
|
mac_address,
|
||||||
broadcast_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."""
|
"""Representation of a wake on lan button."""
|
||||||
|
|
||||||
_attr_name = None
|
_attr_name = None
|
||||||
|
@ -68,8 +68,8 @@ OPTIONS_FLOW = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class StatisticsConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
|
class WakeonLanConfigFlowHandler(SchemaConfigFlowHandler, domain=DOMAIN):
|
||||||
"""Handle a config flow for Statistics."""
|
"""Handle a config flow for Wake on Lan."""
|
||||||
|
|
||||||
config_flow = CONFIG_FLOW
|
config_flow = CONFIG_FLOW
|
||||||
options_flow = OPTIONS_FLOW
|
options_flow = OPTIONS_FLOW
|
||||||
|
Loading…
x
Reference in New Issue
Block a user