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

Add notification ids to the persistent notifications #1504

Open
scauwe opened this issue Jan 28, 2025 · 0 comments
Open

Add notification ids to the persistent notifications #1504

scauwe opened this issue Jan 28, 2025 · 0 comments

Comments

@scauwe
Copy link

scauwe commented Jan 28, 2025

Is your feature request related to a problem? Please describe.
I wanted to trigger an automation whenever the charger was rebooted (to start a new session when one was running before the reboot). For this, I thought creating an automation triggered by the notification "Charger xxxx rebooted" would be simpelst.
This notification however does not provide a fixed id. This id can be used as a filter in the persistent_notification trigger platform.

Describe the solution you'd like
In chargepoint.py:

  • In notify_ha, add a parameter notificationId (defaulting to eg "occp_default").
  • add this to service_data: "notification_id": notificationId
  • In various calls, provide a value for notificationId. eg: in _register_boot_notification, set notificationId = "occp_boot_notification"

Describe alternatives you've considered

  • Getting the state of any of the sensors of the charger/ocpp entities, but nothing seems to cover this 100%
  • As a workaround, I'm using the trigger without id and add an extra condition for this trigger to filter on the title and message
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant