From 8e6bb34d1b51cbf3ffec546fbe3a3471cb148857 Mon Sep 17 00:00:00 2001 From: Arksine Date: Sun, 9 May 2021 20:13:50 -0400 Subject: [PATCH] power: remove unnecessary calls to get_server() The server attribute for these classes is already assigned by their parent. Signed-off-by: Eric Callahan --- moonraker/components/power.py | 5 ----- 1 file changed, 5 deletions(-) diff --git a/moonraker/components/power.py b/moonraker/components/power.py index 13f73b5..fa41bf3 100644 --- a/moonraker/components/power.py +++ b/moonraker/components/power.py @@ -333,7 +333,6 @@ class TPLinkSmartPlug(PowerDevice): START_KEY = 0xAB def __init__(self, config): super().__init__(config) - self.server = config.get_server() self.addr = config.get("address").split('/') self.port = config.getint("port", 9999) @@ -439,7 +438,6 @@ class TPLinkSmartPlug(PowerDevice): class Tasmota(PowerDevice): def __init__(self, config): super().__init__(config) - self.server = config.get_server() self.addr = config.get("address") self.output_id = config.getint("output_id", 1) self.password = config.get("password", "") @@ -516,7 +514,6 @@ class Tasmota(PowerDevice): class Shelly(PowerDevice): def __init__(self, config): super().__init__(config) - self.server = config.get_server() self.addr = config.get("address") self.output_id = config.getint("output_id", 0) self.user = config.get("user", "admin") @@ -587,7 +584,6 @@ class Shelly(PowerDevice): class HomeSeer(PowerDevice): def __init__(self, config): super().__init__(config) - self.server = config.get_server() self.addr = config.get("address") self.device = config.getint("device") self.user = config.get("user", "admin") @@ -646,7 +642,6 @@ class HomeSeer(PowerDevice): class HomeAssistant(PowerDevice): def __init__(self, config): super().__init__(config) - self.server = config.get_server() self.addr = config.get("address") self.port = config.getint("port", 8123) self.device = config.get("device")