From f01d2b1263937b70bf1eed9f0d4ba72435db5d58 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 18 Oct 2015 00:42:02 +0200 Subject: [PATCH] Allow to overwrite the device name --- homeassistant/components/switch/arest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/switch/arest.py b/homeassistant/components/switch/arest.py index 4feb8a5d691..b043fe9e896 100644 --- a/homeassistant/components/switch/arest.py +++ b/homeassistant/components/switch/arest.py @@ -36,7 +36,7 @@ def setup_platform(hass, config, add_devices, discovery_info=None): pins = config.get('pins') for pinnum, pin in pins.items(): dev.append(ArestSwitch(resource, - response.json()['name'], + config.get('name', response.json()['name']), pin.get('name'), pinnum)) add_devices(dev)