Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better text in logbook for trigger state #895

Closed
2 tasks done
tomer-w opened this issue Feb 18, 2024 · 3 comments
Closed
2 tasks done

Better text in logbook for trigger state #895

tomer-w opened this issue Feb 18, 2024 · 3 comments

Comments

@tomer-w
Copy link
Contributor

tomer-w commented Feb 18, 2024

Preface: Alarmo is the best HA integration I know of. I've been using it for years, and it just keeps working and improving. Amazing work!!

Idea: When examining the HA Logbook page for the Alarmo entity, I mostly see excellent data (green in my snip below), which can help me understand what was going on. The only exception is the triggered state, which includes no information to help investigate the issue (red in my snip below).

image

Checklist

  • I checked for similar existing requests (both open and closed) before posting.
  • My request is generic, other users may benefit from it too.

Proposal

It will be great to have all entities that caused the state change show up. This is already supported in the notification feature, but that is an opt-in feature that users need to understand how to configure and how not to lose it later when investigating something. Having it in the logbook makes it way easier to handle.

Additional info

Instead of: Home Alarm changed to Triggered
Should be: Home Alarm changed to Triggered. Cause {{open_sensors}}

@nielsfaber
Copy link
Owner

I fully agree with you this information should be displayed here.
I can also think of other scenarios, like the alarm failing to arm due to some open sensor.
The question is: how?

As far as I know, the logbook component of HA decides on its own which information is displayed.
I am not aware of any provision I can make in the code of Alarmo to make more information show up.
There is no or very little documentation available for developers to improve interaction with the logbook.
I believe the correct term for this extra information is context: https://data.home-assistant.io/docs/context

So in summary, if you or anyone else can give some pointers on how to add provisions for this, I'd be happy to do so.
At the moment I have no idea if or how your request can be fulfilled.

@tomer-w
Copy link
Contributor Author

tomer-w commented Feb 22, 2024

@nielsfaber I think you are right. We should probably grab the new context - new_state.context from async_sensor_state_changed and then send a new context pointing to it when you set the Alarmo state to triggered.
I am still not sure how to send this new context using the wrappers you are using. Let me know if you want me to try to do it or you have better idea.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants