Allow setting name for command switch
parent
4c0ac6051f
commit
965730eb60
|
@ -52,7 +52,7 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||||
for dev_name, properties in switches.items():
|
for dev_name, properties in switches.items():
|
||||||
devices.append(
|
devices.append(
|
||||||
CommandSwitch(
|
CommandSwitch(
|
||||||
dev_name,
|
properties.get('name', dev_name),
|
||||||
properties.get('oncmd', 'true'),
|
properties.get('oncmd', 'true'),
|
||||||
properties.get('offcmd', 'true')))
|
properties.get('offcmd', 'true')))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue