mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
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
This commit is contained in:
parent
3bc37397d2
commit
5a32ddbe6f
@ -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",
|
||||
|
Loading…
x
Reference in New Issue
Block a user