From 965730eb608b50087c850a51b63d842e1d51e2f0 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 13 Sep 2015 23:04:42 -0700 Subject: [PATCH] Allow setting name for command switch --- homeassistant/components/switch/command_switch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/switch/command_switch.py b/homeassistant/components/switch/command_switch.py index c0a8afa7419..52baeebb476 100644 --- a/homeassistant/components/switch/command_switch.py +++ b/homeassistant/components/switch/command_switch.py @@ -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')))