Allow setting name for command switch
This commit is contained in:
1 parent
4c0ac6051f
commit
965730eb60
1 file changed
+1
-1
@@ -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')))
|
||||
|
||||
|
||||
Reference in new issue
Block a user