Skip to content

Commit

Permalink
docs: note changes to bound service init
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Arksine committed Nov 15, 2023
1 parent 6c6b7dc commit e3cf9b2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
15 changes: 7 additions & 8 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
```

Expand All @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit e3cf9b2

Please sign in to comment.