Repository navigation
fix(monitoring): report no judgement for a point whose monitoring is off - #332
Merged
Merged
Conversation
get_monitoring_status kept the utilization, last current and over-threshold time a circuit or the mains had when its monitoring was turned off, so the panel view showed a frozen figure for a point nobody monitors. Those fields now read null while monitoring is off, and turning it off drops the sample and open window so a later re-enable does not alert on a window from before.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A circuit or main breaker whose current monitoring is turned off kept the utilization, last current and alert window it had when monitoring stopped. The panel view and Get monitoring status showed that frozen figure for a point nobody monitors. 2.1.2 has the same behaviour.
Change
current_monitor.py,get_monitoring_status: a circuit with monitoring off reportsnullfor utilization, last current and over-threshold since. The same applies to the mains entry's utilization and peak current.current_monitor.py,set_circuit_overrideandset_mains_override: turning monitoring off drops the point's last sample and closes any open window. Turning it back on starts a fresh window, so it cannot alert on one opened before. Past alert times are kept.Checks
TestStatusWhileMonitoringIsOff:Not covered