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

notifications #116

Closed
landonr opened this issue Apr 25, 2024 · 2 comments
Closed

notifications #116

landonr opened this issue Apr 25, 2024 · 2 comments

Comments

@landonr
Copy link
Owner

landonr commented Apr 25, 2024

Is your feature request related to a problem? Please describe.
notifications exist but theyre hard to call

Describe the solution you'd like
add service calls

Additional context

voice_assistant:
  microphone: external_mic
  on_start:
    then:
      lambda: |-
        id(homeThingMenu)->clearNotifications();
        id(homeThingMenu)->addNotification("Voice Assistant", "Listening", "", true);

this should be a service call

@landonr
Copy link
Owner Author

landonr commented Apr 28, 2024

#118

@landonr landonr closed this as completed Apr 28, 2024
@ManuRiver
Copy link

ManuRiver commented Jul 26, 2024

This sparked the following idea and wanted to share back with you guys.

Add the following self published service to esphome config file.

service: ##provisions a self published service back to homeassistant thru esphome api.

api:
  encryption:
    key: !secret api

  services:
    - service: notify_homething
      variables:
        title: string
        message: string
        # type_str: string
      then:
        - lambda: |-
            id(homeThingMenu)->addNotification(title, message, "", true);

##configuration.yaml on the hass side, profit ;-)

notify:
  - platform: group
    name: "Notify Homething"
    services:
      - service: esphome ##propagates the notify.notify events back to the variables and calls back the service.
        data:
          target: studiotdisplay_notify_homething

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

2 participants