Skip to content

fix(memtemp-plus): prevent KeyError on missing config options#12

Open
CoderFX wants to merge 1 commit intojayofelony:mainfrom
CoderFX:fix/memtemp-plus-keyerror
Open

fix(memtemp-plus): prevent KeyError on missing config options#12
CoderFX wants to merge 1 commit intojayofelony:mainfrom
CoderFX:fix/memtemp-plus-keyerror

Conversation

@CoderFX
Copy link
Copy Markdown

@CoderFX CoderFX commented Mar 12, 2026

Summary

  • Use .get() with defaults for scale (default: celsius) and orientation (default: horizontal)
  • Initialize self.fields in __init__ to prevent AttributeError

Fixes #11 (partially)

- Use .get() with defaults for 'scale' (default: celsius),
  'orientation' (default: horizontal) to prevent KeyError when
  options are not set in config.toml
- Initialize self.fields in __init__ to prevent AttributeError
  if on_unload is called before on_ui_setup
- Bump version to 1.0.4
@CoderFX CoderFX force-pushed the fix/memtemp-plus-keyerror branch from c33caad to 0d3cabf Compare March 12, 2026 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

memtemp-plus: KeyError crashes when config options missing

1 participant