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')))