mirror of
https://github.com/home-assistant/core.git
synced 2025-07-20 19:57:07 +00:00
Broadlink service name (#16345)
* Broadlink. slugify service name * style
This commit is contained in:
parent
7a77951bb4
commit
1f74adae2a
@ -142,9 +142,11 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||||||
if switch_type in RM_TYPES:
|
if switch_type in RM_TYPES:
|
||||||
broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
|
broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
|
||||||
hass.services.register(DOMAIN, SERVICE_LEARN + '_' +
|
hass.services.register(DOMAIN, SERVICE_LEARN + '_' +
|
||||||
ip_addr.replace('.', '_'), _learn_command)
|
slugify(ip_addr.replace('.', '_')),
|
||||||
|
_learn_command)
|
||||||
hass.services.register(DOMAIN, SERVICE_SEND + '_' +
|
hass.services.register(DOMAIN, SERVICE_SEND + '_' +
|
||||||
ip_addr.replace('.', '_'), _send_packet,
|
slugify(ip_addr.replace('.', '_')),
|
||||||
|
_send_packet,
|
||||||
vol.Schema({'packet': cv.ensure_list}))
|
vol.Schema({'packet': cv.ensure_list}))
|
||||||
switches = []
|
switches = []
|
||||||
for object_id, device_config in devices.items():
|
for object_id, device_config in devices.items():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user