Allow setting name for command switch

pull/368/head
Paulus Schoutsen 2015-09-13 23:04:42 -07:00
parent 4c0ac6051f
commit 965730eb60
1 changed files with 1 additions and 1 deletions

View File

@ -52,7 +52,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
for dev_name, properties in switches.items():
devices.append(
CommandSwitch(
dev_name,
properties.get('name', dev_name),
properties.get('oncmd', 'true'),
properties.get('offcmd', 'true')))