mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
add_entities for switchmate (#16368)
This commit is contained in:
parent
4685a2cd97
commit
1966597d5e
@ -31,11 +31,11 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
|
|||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None) -> None:
|
def setup_platform(hass, config, add_entities, discovery_info=None) -> None:
|
||||||
"""Perform the setup for Switchmate devices."""
|
"""Perform the setup for Switchmate devices."""
|
||||||
name = config.get(CONF_NAME)
|
name = config.get(CONF_NAME)
|
||||||
mac_addr = config.get(CONF_MAC)
|
mac_addr = config.get(CONF_MAC)
|
||||||
add_devices([Switchmate(mac_addr, name)], True)
|
add_entities([Switchmate(mac_addr, name)], True)
|
||||||
|
|
||||||
|
|
||||||
class Switchmate(SwitchDevice):
|
class Switchmate(SwitchDevice):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user