mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Allow setting name for command switch
This commit is contained in:
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():
|
||||
devices.append(
|
||||
CommandSwitch(
|
||||
dev_name,
|
||||
properties.get('name', dev_name),
|
||||
properties.get('oncmd', 'true'),
|
||||
properties.get('offcmd', 'true')))
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user