Broadlink service name (#16345)
* Broadlink. slugify service name * style
This commit is contained in:
parent
7a77951bb4
commit
1f74adae2a
1 changed files with 4 additions and 2 deletions
|
@ -142,9 +142,11 @@ def setup_platform(hass, config, add_entities, discovery_info=None):
|
|||
if switch_type in RM_TYPES:
|
||||
broadlink_device = broadlink.rm((ip_addr, 80), mac_addr, None)
|
||||
hass.services.register(DOMAIN, SERVICE_LEARN + '_' +
|
||||
ip_addr.replace('.', '_'), _learn_command)
|
||||
slugify(ip_addr.replace('.', '_')),
|
||||
_learn_command)
|
||||
hass.services.register(DOMAIN, SERVICE_SEND + '_' +
|
||||
ip_addr.replace('.', '_'), _send_packet,
|
||||
slugify(ip_addr.replace('.', '_')),
|
||||
_send_packet,
|
||||
vol.Schema({'packet': cv.ensure_list}))
|
||||
switches = []
|
||||
for object_id, device_config in devices.items():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue