giuseppecastaldo / ha-addons

Home Assistant Whatsapp Add-on
Apache License 2.0
49 stars 18 forks source link

notify service #60

Closed rba closed 5 months ago

rba commented 5 months ago

Would it be possible to implement it as well as notify.* service?

I like to add it into notify groups https://www.home-assistant.io/integrations/group/#notify-groups and in Alerts https://www.home-assistant.io/integrations/alert/.

giuseppecastaldo commented 5 months ago

the solution is to create a script that includes everything, visit the home assistant documentation

rba commented 5 months ago

Hi @giuseppecastaldo I little more hints where to look would be helpful. May you give me some more details where to start looking? Cheers, Roman

rba commented 5 months ago

Ok, I have a solution for myself.

I used pyscrypt from HACS.

notify_whatsapp.py:

@service("notify.whatsapp_send_message")
def whatsapp_send_message(clientId=None, to=None, body=None):
    whatsapp.send_message(**locals())