From fd6d318f0a9211cab299e14d58136ba494949231 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 20 Nov 2021 11:24:13 -0500 Subject: [PATCH] power: use extended confighelper methods Signed-off-by: Eric Callahan --- moonraker/components/power.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/moonraker/components/power.py b/moonraker/components/power.py index 54a66f3..0448877 100644 --- a/moonraker/components/power.py +++ b/moonraker/components/power.py @@ -31,7 +31,6 @@ if TYPE_CHECKING: from confighelper import ConfigHelper from websockets import WebRequest from .machine import Machine - from .gpio import GpioFactory from . import klippy_apis APIComp = klippy_apis.KlippyAPI @@ -442,11 +441,9 @@ class GpioDevice(PowerDevice): f"Option 'timer' in section [{config.get_name()}] must " "be above 0.0") self.timer_handle: Optional[asyncio.TimerHandle] = None - gpio: GpioFactory = self.server.lookup_component('gpio') if initial_val is None: initial_val = int(self.initial_state) - self.gpio_out = gpio.get_gpio_out_from_config( - config, initial_value=initial_val) + self.gpio_out = config.getgpioout('pin', initial_value=initial_val) def initialize(self) -> None: super().initialize()