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 push notification to saving session blueprint #758

Closed
1 of 2 tasks
Peter-HVD opened this issue Feb 15, 2024 · 6 comments
Closed
1 of 2 tasks

Add push notification to saving session blueprint #758

Peter-HVD opened this issue Feb 15, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request external contributions welcome The feature has been accepted and the criteria has been defined

Comments

@Peter-HVD
Copy link

Describe the feature

Please add the ability to send a push notification when a saving session is automatically joined.

Expected behaviour

Send a push notification when a saving session is automatically joined

Use Case

When a saving session is automatically joined, there is no information about that except for in the HA dashboard. It would be great to have a notification sent to my iPhone so that I know to turn everything off at the appropriate time!

Confirmation

  • By submitting this feature request, you agree that you have read the documentation and confirmed it does not already exist
  • I am willing/able to help contribute to the solution of this feature
@Peter-HVD Peter-HVD added the enhancement New feature or request label Feb 15, 2024
@vansteedens
Copy link

Hi Peter, this is already possible by adding a device action if you have a phone set up with the HA app. This is the visual editor showing mine:

Screenshot 2024-02-16 at 09 52 24

I then just used the message: Joined new Octopus Energy saving session. It starts at {{ trigger.event.data["event_start"].strftime('%H:%M') }} on {{ trigger.event.data["event_start"].day }}/{{ trigger.event.data["event_start"].month }}

Hope that helps and it will send regardless if you have external monitoring of your HA as it's just an app push.

@Peter-HVD
Copy link
Author

Hi. Thanks, yes I know I can do that myself. My point was it would be nice if it was added to the blueprint so it can be added automatically.

@Peter-HVD
Copy link
Author

Actually, having said that, I've tried adding an automation and I can't get it to work. Any chance you could share the yaml? Cheers.

@vansteedens
Copy link

vansteedens commented Feb 16, 2024

Here you go, I've edited out my ID's and not actually sure how you find out your mobile device ID as can't find it anywhere, mine was added by the visual editor which I imagine just comes from the Mobile App integration once you've installed the HA app on your device:

alias: Octopus Saving Session Joiner
description: Automatically Join Octopus Saving Session Events
trigger:
  - platform: event
    event_type: octopus_energy_new_octoplus_saving_session
condition: []
action:
  - service: octopus_energy.join_octoplus_saving_session_event
    data:
      event_code: "{{ trigger.event.data[\"event_code\"] }}"
    target:
      entity_id: event.octopus_energy_a_xxxxx_octoplus_saving_session_events
  - service: persistent_notification.create
    data:
      title: Octopus Saving Sessions Updated
      message: >
        Joined new Octopus Energy saving session. It starts at {{
        trigger.event.data["event_start"].strftime('%H:%M') }} on {{
        trigger.event.data["event_start"].day }}/{{
        trigger.event.data["event_start"].month }} 
  - device_id: xxxxxx
    domain: mobile_app
    type: notify
    message: >
      Joined new Octopus Energy saving session. It starts at {{
      trigger.event.data["event_start"].strftime('%H:%M') }} on {{
      trigger.event.data["event_start"].day }}/{{
      trigger.event.data["event_start"].month }}
    title: New saving session has been joined
mode: single

@BottlecapDave
Copy link
Owner

Hello. The blueprints here are designed to get people up and running quickly and provide an example of how things can be done. I went with the persistent notification because everyone has access to it.

I'm happy for a second blueprint to exists along side it with the desire to send to someone's phone. I'm not sure when I'll get around to it. Similarly happy for someone else to tackle it and open a merge request.

@BottlecapDave BottlecapDave added the external contributions welcome The feature has been accepted and the criteria has been defined label Feb 16, 2024
@BottlecapDave
Copy link
Owner

There is now a separate version of the blueprint which supports added custom actions when a saving session is joined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request external contributions welcome The feature has been accepted and the criteria has been defined
Projects
None yet
Development

No branches or pull requests

3 participants