Skip to content

Commit

Permalink
Broadlink service name (#16345)
Browse files Browse the repository at this point in the history
* Broadlink. slugify service name

* style
  • Loading branch information
Danielhiversen authored and balloob committed Sep 24, 2018
1 parent 7a77951 commit 1f74ada
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions homeassistant/components/switch/broadlink.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,11 @@ def _get_mp1_slot_name(switch_friendly_name, slot):
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():
Expand Down

0 comments on commit 1f74ada

Please sign in to comment.