How can I send a notify to my mobile

Hello,

I’m new here and new to HA. I’m from ioBroker, wich is very nice but I want to try HA because of the IMHO great UI for Desktop and mobiles.
In ioBroker I realized a simple automation wich does the following:
If I open a window, store the current value of my HMIP radiator to a value and set the temperature to 10 degrees and send a message to my iPhone
If I close the window, restore the temperature and send a message to my iPhone.

In HA my “expertise” let me only store the HMIP temp to a variable and restore it when window closes.
But I’m not able to send a message. I read the documentation and for itself I’m able to send a simple notification. But when I try to integrate that in my automation it won’t work. I read the documentation and searched here but I couldn’t find a solution. Please excuse me if there’s already a threat and I didn’t get this. Maybe someone can help me please. Thanks in advance.

Cheers Rick

alias: Fenster auf Arbeitszimmer
  trigger:
    platform: state
    entity_id: binary_sensor.az_fkt_li_state #Wenn der Wert des Fenstersensors im Arbeitszimmer...
    to: 'on' #...den Status "on" hat (also Fenster auf)... 
  action:
    - service: input_number.set_value
      data_template:
        entity_id: input_number.current_temp_az
        value: '{{ states.climate.az_hzg_fenster.attributes.temperature | float }}' #...Dann schreibe den Wert aus dem Thermostat in die Variable...
    - service: climate.set_temperature
      data:
        entity_id: climate.az_hzg_fenster
        temperature: '10.0' #...Und setze das Thermostat auf 10.0 Grad
- alias: Fenster zu Arbeitszimmer
  trigger:
    platform: state
    entity_id: binary_sensor.az_fkt_li_state #Wenn der Wert des Fenstersensors im Arbeitszimmer...
    to: 'off' #...den Status "off" hat (also Fenster zu)...
  action:
    service: climate.set_temperature
    data_template:
      entity_id: climate.az_hzg_fenster
      temperature: '{{ states.input_number.current_temp_az.state }}' #...dann setze den Wert aus der Variablen

I don’t see anywhere you’re trying to send a notification in that, but it’s just another service call.

alias: Fenster auf Arbeitszimmer
  trigger:
    platform: state
    entity_id: binary_sensor.az_fkt_li_state #Wenn der Wert des Fenstersensors im Arbeitszimmer...
    to: 'on' #...den Status "on" hat (also Fenster auf)... 
  action:
    - service: input_number.set_value
      data_template:
        entity_id: input_number.current_temp_az
        value: '{{ states.climate.az_hzg_fenster.attributes.temperature | float }}' #...Dann schreibe den Wert aus dem Thermostat in die Variable...
    - service: climate.set_temperature
      data:
        entity_id: climate.az_hzg_fenster
        temperature: '10.0' #...Und setze das Thermostat auf 10.0 Grad
    - service: notify.whatever_its_called
      data:
        message: "Your message here"

For example

You can see the service name you should be calling by looking under Developer Tools then Services.

Hi Rick,
I learned a lot from your automation :smile:
Did you try automation with scripts as mentioned in the docs?


“Actions are scripts so can also be a list of actions”

Hey Tinkerer,

thank you for your answer. Sorry, I copied the wrong code because I cleaned “my mess” up due to problems. Thank you I will try this, when I’m at home.

I used this example before but it didn’t work

data:
message: Something happened at home!
service: notify.notify

Hey Honikos,

wohoo, my first automation and someone can use it :smiley:
I read the docs but as I can see (no joke, I read them 3 times before) there is my example I need I think. I will test it afterwork.
My aim is it to create my automation via scripts but unfortunately I have problems understanding code. In ioBroker I used blokly in HA I try to create my automation with the integrated editor

1 Like

That’s only valid if the service notify.notify exists - maybe yours is called something else

From his statement’s and the direction of the discussion, I don’t think he has a notification service set up

Hey Mutt,

the notify service is working. I just tested it with a simple button. My problem was to extend an existing automation. Notify.notify is working for me. I just thougt the notify.notify uses the HA app on my phone

When you say it is working, how did you tedt it? Through Developer Tools -> Services?
If so the service you used should be something like notify.my_phone

I created a simple automation with my philips remote. If button one ist pressed, switch light on and send message. That is working. But in my case wich I explained above the message wasn’t sent. But the hint from tinkerer is working now. I just tested it 2 minutes ago.
So thank you very much for your help!!

Cheers
Rick

2 Likes