From 5a32ddbe6f9f939dcc90d567d027e1f5c5221b89 Mon Sep 17 00:00:00 2001 From: Will Hughes Date: Thu, 7 Apr 2016 09:52:21 +1200 Subject: [PATCH] Update Orvibo platform to the switch component, add 'mac' option This adds an optional 'mac' configuration option to the platform which is passed to the underlying Orvibo library. The 'mac' option is required when the switch is connected to a different subnet to the Home Assistant host --- homeassistant/components/switch/orvibo.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/switch/orvibo.py b/homeassistant/components/switch/orvibo.py index 8d92e071f92..b2b8ed41abe 100644 --- a/homeassistant/components/switch/orvibo.py +++ b/homeassistant/components/switch/orvibo.py @@ -26,9 +26,10 @@ def setup_platform(hass, config, add_devices_callback, discovery_info=None): _LOGGER.error("Missing required variable: host") continue host = switch.get('host') + mac = switch.get('mac') try: switches.append(S20Switch(switch.get('name', DEFAULT_NAME), - S20(host))) + S20(host, mac=mac))) _LOGGER.info("Initialized S20 at %s", host) except S20Exception: _LOGGER.exception("S20 at %s couldn't be initialized",