Easily Send Home-Assistant Notifications using Whatsapp

Yeah it works here when you use the templates as mentioned above.
In that case you don’t need to send a message every that as using that template the message will always arrive.

You can for example use this message and you will see it arrives in Whatsapp:

Your HA code is this is a test

Just replace the

this is a test

part with the actual message you want to send, but make sure it always starts with

Your HA code is 

Thanks @gerard33

The following is my code, could you please let me know if this is you are suggesting ?

import appdaemon.plugins.hass.hassapi as hass
import datetime

class AutoTurnOnOffOutdoorLightes(hass.Hass):

  def initialize(self):

    # Create a time object for 18:30
    runtime_lights_on = datetime.time(18, 30, 0)
    # Schedule a daily callback that will call turn_on_outdoor_lights() at 18:30 every night
    self.run_daily(self.turn_on_outdoor_lights, runtime_lights_on)

  def turn_on_outdoor_lights(self, entity):
    self.log("Turned on outdoor lights at 18:30 every night.")
    self.call_service("notify/whatsapp", message = "Your HA code is - Turned on outdoor lights.", target = "+972549123456")
    self.turn_on("group.outdoor_lights")

Yeah that should work indeed.

1 Like

Thanks,

I’ll check it.

Working.
Thanks !!

Have you tried this API to send WhatsApp messages? It is very easy to setup and no registration required. :slight_smile:

I’m using it for a 1 week and it is working very well so far. There is a delay of 5-15 seconds for the message to arrive but it is not a constraint for my use-case.

3 Likes

I have managed to find new way to send whatsapp messages without any external provider.
Working on a new guide.

4 Likes

Well done @Tomer_Klein can you please share a how to guide? Many thanks

Nice one Tomer! Would love to see a guide…

Interested

Any change you can share a guide Tomer?

Hi @CarlE Still working on it.
It’s taking more that i have planned

4 Likes

Thanks for you reply, take your time :slight_smile:

Hi Tomer,
Any news on this one ?

Regards,
Jens

I’d also love to use this to send automations from my HA setup.

Hi,any update on this topic?

still waiting for your guide.

Will there be any information if this project continues?

1 Like

Please be encouraged to finish this development. :+1:

Hello all,

I am the maintainer of open-wa (https://docs.openwa.dev/) and I intend to develop an addon for home assistant that will allow you to integrate with API requests. If you know your way around docker you can set it up right now actually using this repo:

or just use the CLI (which automatically converts your account into an API with an API explorer - you just need to make sure you have node/npx installed):

npx @open-wa/wa-automate --help

I would appreciate if you can participate in this Github discussion to show a need for an open-wa add-on as part of the official home assistant add on repository:

https://github.com/hassio-addons/repository/discussions/220

Thanks

2 Likes