GMFalka
(Gm Falka)
1
Hello!
Im trying to send messages to my android AutoRemote app via the “official” URL
This works:
curl "https://autoremotejoaomgcd.appspot.com/sendmessage?key=_apikey_&message=hello world"
This not so much:
curl "https://autoremotejoaomgcd.appspot.com/sendmessage?key=_apikey_&message={{ states.sensor.weather.attributes.temp }}"
Im pretty sure the quotes making it fail. Whats the correct way to insert sensor states into the actual URL?
Thanks!
ashfaaaa
(Ashfaaaa)
2
did u find a way it do it? even im trying to send autoremote message from HA
GMFalka
(Gm Falka)
3
Yes! I will get back to you tonight.
1 Like
yllar
(Yllar)
5
using https://home-assistant.io/components/rest_command/ it should be something like:
rest_command:
sendmessage:
url: 'https://autoremotejoaomgcd.appspot.com/sendmessage?key=_apikey_&message={{ states.sensor.weather.attributes.temp }}'
ashfaaaa
(Ashfaaaa)
6
how can i do it in automation?
yllar
(Yllar)
7
- alias: 'Something something'
hide_entity: False
trigger:
platform: state
entity_id: 'switch.sonoff_4'
from: 'off'
to: 'on'
action:
service: rest_command.sendmessage
1 Like
GMFalka
(Gm Falka)
8
I see yllar already helped you and his solution is actually more up-to-date to current hass version then mine.
You can also do a shell_command.yaml:
tasker_alarm: curl -k "https://autoremotejoaomgcd.appspot.com/sendmessage?key=KEY&message={{ as_timestamp(states.calendar.work.attributes.start_time}}"
1 Like