Skip to content

Commit

Permalink
fix(klipper): display settings are optional
Browse files Browse the repository at this point in the history
  • Loading branch information
SanaaHamel committed Feb 16, 2024
1 parent baa22c4 commit ce0b93c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions klipper/nevermore.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,13 +967,13 @@ def cfg_fan_power(mk: Callable[[float], CmdFanPowerAbstract], name: str):

self._display_brightness = opt(
CmdDisplayBrightness,
config.getfloat("display_brightness", minval=0, maxval=1),
config.getfloat("display_brightness", default=None, minval=0, maxval=1),
)

try:
self._display_ui = opt(
lambda x: CmdDisplayUI(DisplayUI[x.upper()].value),
config.get("display_ui"),
config.get("display_ui", default=None),
)
except KeyError:
raise config.error(
Expand Down

0 comments on commit ce0b93c

Please sign in to comment.