From e3cf9b2aa941b155560da70c2af1709ffe7e77c7 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Wed, 15 Nov 2023 17:35:02 -0500 Subject: [PATCH] docs: note changes to bound service init When "initial_state" is configured, bound services will be initialzed based on that state...stopped if the state is "off", started if its "on. Signed-off-by: Eric Callahan --- docs/changelog.md | 2 ++ docs/configuration.md | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index dc6b696..62f3ad7 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -61,6 +61,8 @@ The format is based on [Keep a Changelog]. - **update_manager**: APIs that return status report additional fields. See the [API Documentation](./web_api.md#get-update-status) for details. - **proc_stats**: Improved performance of Raspberry Pi CPU throttle detection. +- **power**: Bound services are now processed during initialization when + `initial_state` is configured. ## [0.8.0] - 2023-02-23 diff --git a/docs/configuration.md b/docs/configuration.md index 54e296a..b4dfdeb 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -616,6 +616,9 @@ type: # tplink_smartplug, tasmota, shelly, homeseer, homeassistant, loxonev1, # smartthings, mqtt or hue. # This parameter must be provided. +initial_state: off +# The state the power device should be initialized to. May be on or +# off. When this option is not specifed no initial state will be set. off_when_shutdown: False # If set to True the device will be powered off when Klipper enters # the "shutdown" state. This option applies to all device types. @@ -654,6 +657,10 @@ bound_services: # the Moonraker service can not be bound to a power device. Note that # service names are case sensitive. # +# When the "initial_state" option is explcitly configured bound services +# will be synced with the current state. For example, if the initial_state +# is "off", all bound services will be stopped after device initialization. +# # The default is no services are bound to the device. ``` @@ -679,10 +686,6 @@ pin: gpiochip0/gpio26 # !gpiochip0/gpio26 # !gpio26 # This parameter must be provided for "gpio" type devices -initial_state: off -# The initial state for GPIO type devices. May be on or -# off. When moonraker starts the device will be set to this -# state. Default is off. timer: # A time (in seconds) after which the device will power off after being. # switched on. This effectively turns the device into a momentary switch. @@ -833,10 +836,6 @@ pin: gpiochip0/gpio26 # !gpiochip0/gpio26 # !gpio26 # This parameter must be provided for "gpio" type devices -initial_state: off -# The initial state for GPIO type devices. May be on or -# off. When moonraker starts the device will be set to this -# state. Default is off. timer: # A time (in seconds) after which the device will power off after being. # switched on. This effectively turns the device into a momentary switch.