Easily Send Home-Assistant Notifications using Whatsapp

It really works, great. thank you very much.
I also have the same problem if I am not sending a message for a long time, I need to resend the code “join soap-bee”.

But glad to be able to work, and very grateful to you and @Tomer_Klein

you Sir, have made my day!
thanks, your solution is working.

thanks Tomer for a great component

And how can i use this with an automation now?

cool, a whatsapp “integration”, … :slight_smile:

it is possible to send images also ? for a camera snapshot?

please add an automation example.

Is it now possible to send messages which don’t match a predefined template?

I am stuck with this error? Any help would be appreciated thanks

error: Unable to create record: Twilio could not find a Channel with the specified From address

I completed the procedure but I am not even able to find a service under notify in the name of what i have put in config to sent message. Why is it so?

If there is no one message sent after a few days, it’s neccessary to send code to twilio again to start messages working. This is because free trial version close connection after a few days if no messages sent. For use it without breaking connection messages should be sent using template described in twilio service. So, I use “Your message code is MESSAGE”. It’s allow me to not worry if there is no message sent in a few days.

Could you explain what do you mean ?

  1. Twillio free tariff has predefined templates for messages. Like “your message code is MESSAGE”.
  2. If you send messages not in template format - service will stop working if there is no one message in a few days. Then you should start it again by sending approving code like a first time.
  3. If you send messages in template format - there is no matter how long you haven’t been sent messages - service will always send it.

As you said, I should start it again by sending approving code like a first time (sending “join soap-bee” every day).
So, if I’ll send the “your message code is MESSAGE” message, I done with sending any message ?

Something like that. As @gerard33 mentioned and I experienced, if there is no messages sent some time - messages stop sending and you should send approve code to twillio again. But when I started to send messages formatted by template, messages are sent over a month already without problems.
Or you can switch to paid tariff.

Thanks, I’ll try that.

Cool, thanks for letting us know.

These are the 3 available templates btw:

Your {{1}} code is {{2}}
Your appointment is coming up on {{1}} at {{2}}
Your {{1}} order of {{2}} has shipped and should be delivered on {{3}}. Details: {{4}}

I am using:
Your HA code is -> <message_here>

Hi

Is it working for you ?

Maybe I don’t really understand what should I do to avoid sending the messages each day.

Regards,
Alex.

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.