Closed edwardtfn closed 1 year ago
@tdashmike, the logbook registers every time the automation runs, which happens once a minute or when a value on Home page or the displayed screen is updated. Is that causing a problem for you?
What would you expect?
@edwardtfn No, it's not really a problem but it's hard to see stuff when there are so many messages from the automation. I think it would be good to have a debug mode where it's displaying the messages like it does now or you can turn it off. For example, if I turn on a light (not from the panel) it triggers the automation because it needs to update the icon status. On a daily bases I think that is not necessary. Great work on the blueprint though!
I think it would be good to have a debug mode where it's displaying the messages like it does now or you can turn it off.
Unfortunately that is not under our control. Those messages on your Logbook are not intentional from our code, it is Home Assistant recording an entry for each time an automation runs. What it is under our control (to certain level) are the triggers to run the automation. We can reduce triggers, but with a cost of less responsiveness or a slower interface in the panel (as we could load the home page only when it is visible, but that was the case before and everyone complained it was too slow, so we started updates in the background).
For example, if I turn on a light (not from the panel) it triggers the automation because it needs to update the icon status.
This is exactly how it is, but only if that light is on home page or if the page related to that light is visible. The home page is the only one with updates when is not visible. All the other pages only updates if it is currently visible. So, if you turn on your light by a motion sensor, let's say, and the light is not visible in the panel and is not in home page, the automation won't be triggered.
On a daily bases I think that is not necessary.
I mean only the date display. Currently that is updated every minute, and as time is now calculated internally in the panel, there's no need to run the date update every minute as before. The date only changes once a day. 😉 All other info would be update on demand when an event happens.
Great work on the blueprint though!
Thanks a lot for the feedback. 🙂
About the part where it's not supposed to update if it's not currently visible. My screen is currently off (asleep) and if I wake it up it's on the home screen with no controls for other switches or lights. The screenshot above shows it was triggered by the light though, is that normal? The light is on page 3 of my setup.
I have to double check, but I think it shouldn't trigger the automation in that case.
I found it in the code... This situation will trigger the automation, but not doing anything, no message to the panel... I will take a look on how to change this. It was in a PR a long time ago, but we probably closed that one without merging.
I found a post on turning off logging for specific items: https://community.home-assistant.io/t/how-to-prevent-a-log-entry-when-an-automation-is-executed/255876
At the very bottom someone shows how to turn it off in the logbook:
recorder:
exclude:
entities:
- automation.abc
I think that mostly fixes it so it's up to you if you want to continue pursuing this. Thank you!
I still want to work on this... Stop logging is hiddind the problem, not solving it. 😉
I believe this issue is already resolved on dev
, so I will close this and we reopen if needed.
Hello, I am on 4.0.2. Is there a way to reduce the log entries for NSPanel? I am guessing 99% of my log entries are from it now.
_Originally posted by @tdashmike in https://github.com/Blackymas/NSPanel_HA_Blueprint/discussions/1204_