Skip to content

Commit

Permalink
fix: 🐛 Fixed a bug where used_weight is empty sometimes
Browse files Browse the repository at this point in the history
fixes #77
  • Loading branch information
Disane87 committed Mar 4, 2024
1 parent ffb5983 commit 03ce8fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/spoolman/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _handle_coordinator_update(self) -> None:
_LOGGER.warning("SpoolManCoordinator: Spool with ID '%s' has no 'weight' set or property is missing in filament. Can't calculate usage. Skipping.", self._spool['id'])
return

if self._filament.get("used_weight") is None:
if self._spool.get("used_weight") is None:
_LOGGER.warning("SpoolManCoordinator: Spool with ID '%s' has no 'used_weight' set or property is missing in filament. Can't calculate usage. Skipping.", self._spool['id'])
return

Expand Down

0 comments on commit 03ce8fc

Please sign in to comment.