Skip to content

BUG: NUT-Monitor 'was_online' should be a class variable. #3160

@xxxajk

Description

@xxxajk

https://github.com/networkupstools/nut/blob/master/scripts/python/app/NUT-Monitor-py3qt5.in#L900

Because was_online is not a class variable, and always reset to True, while on battery, gui_status_notification spams desktop with notifications.

Fix:
Move line 900 to line 887
change was_online to self.was_online on lines 929, 931, 935, 938

The same is also true for the other variants.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Incorrect or missing readingsOn some devices driver-reported values are systemically off (e.g. x10, x0.1, const+Value, etc.)bugimpacts-release-2.7.4Issues reported against NUT release 2.7.4 (maybe vanilla or with minor packaging tweaks)impacts-release-2.8.4Issues reported against NUT release 2.8.4 (maybe vanilla or with minor packaging tweaks)python

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions