Allow to ignore selected status updates, in order not to "spam" the activity log. #4692
Replies: 4 comments 1 reply
|
🏷️ I've automatically added the |
|
You can do this by excluding these |
|
Stop the SPAM of Notification messages sent to the HA UI (Notification in the left menu)! - Let the user choose. Big thanks to the guys that brought the NUT integration to HA. I find all the spam messages sent, by the what I guess is the NUT integration, to the "Notification" section in the left menu annoying. THey should not be hard coded. We have automations to use and select on what messates or notifications we want. Not to be forced to receive them. I dont see the point. I dont think that the actions or capture an event should be shut down. However we need to be able to decide on if we want to see this message or not and where. Where it should be sent. @ipa-bak I did read your post and I dont know if we are hitting the same issue? @Petro31 But if you exclude them in the recorder. You wont have any tracking? Freedom to the users.... :) |
|
I agree there should be an easy way to alter the recorder status for each entity, not just the NUT integration. My request: In the meantime to address the pressing issue for @BjoKaSH : Sensor: battery_charger_status <<- the offending one that is spamming the database, or is it the virtual status ones called ups_status and ups_status_display? From the official documentation at https://www.home-assistant.io/integrations/recorder/#exclude Edit the file configuration.yaml by using the simple file addon app File Editor (Settings/Apps/File Editor to install it) and open your configuration.yaml file by clicking on it. You may find a lot or a little in there. You are looking for the recorder section starting at the first column. This will exclude the recorder from adding these constantly changing entries to the database. This should take care of it until the recorder status change functionality is added, either globally as an UI extension (desired), or specifically in the NUT integration. As far as tracking, the entity state should reflect the current state always, recorded or not, so the automations should continue to work. We're not shutting down the entity altogether, just not recording what it does. More generally: In sensor.py in the function _format_display_state the status is joined. Maybe that is where the problem lies, too much aggregation for the sensor, or too much annoying flapping? This flows on from the discussions and changes in September 2023 at Redesign how state attributes are excluded from history #964 and June 2024 blog at Excluding all state attributes from recording using MATCH_ALL The decision to combining the recorder and activity may need revision, this time with hindsight. Has this been kicked down the track for too long? Is it time to revisit this? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Integration name
NUT
Link to integration documentation on our website
https://www.home-assistant.io/integrations/nut/
Describe the enhancement
Background
Currently, the NUT integration tracks NUT variables and report any change of an enabled NUT variable directly, without any option to filter. Unfortunately many "consumer-grade" UPS are really buggy and generate false or transient values. This can spam the Home Assistant activity log to the point, where it becomes unusable. Therefore it would be very useful to be able to filter the values of sensors / entities with discrete values before the NUT Integration feeds these into the normal processing and logging machinery of Home assistant.
Example
Specifically, in my case, the UPS switches its ups.status value about every 2-3 minutes from "Online" to "Online" + "Battery Charging" for a few 10 seconds.
Desired option
I am looking for a way to define - either in the UI or by editing some YAML configuration - combinations of states, like "Online, Battery Charging", that should be completely ignored.
Implementation idea / handling corner cases:
With "completely ignored" I mean that transition into these or out of these ignored states should not cause an activity or history record for the sensor to be created. Instead, when transitioning into such an ignored state, the previous state value should be maintained and the sensor should be considered unchanged. When transitioning out of an ignored state, the new state should be compared to the previous state (before transitioning into the ignored state) and if the same, the sensor should be considered unchanged; if the new state differs from the previous not ignored state, the new state should be used and propagated as normal, i.e. the sensor considered changed.
Use cases
This change would help with "noisy" UPS models / firmware that otherwise spams the Home Assistant event logging, potentially to the point where it becomes unusable.
Addressing the issue on the NUT tools / server or driver level does not seem correct, as the NUT tools are supposed to monitor the UPS and reliably report the status the UPS hardware is in (or its firmware "thinks" it is in). In the NUT world, filtering and interpreting the UPS reported data is task of the monitoring clients.
Anything else?
I had a closer look at the Integration's source here (homeassistant/components/nut/coordinator.py and homeassistant/components/nut/sensor.py, and also homeassistant/helpers/update_coordinator.py), but I could not identify where I would have to add such an "ignore this update" logic within the rather complicated looking control flow with all the involved callbacks and overloaded methods.
All reactions