Oh, I missed your reply 'cause you didn’t reply to my post
However in the meantime found a solution, a bit different:
In the “Call HA get” Task (the one with http request and autotools json read) I added task -> return action.
In there I entered the %state variable. This is specifically made for “perform task”.
Now in the “perform task” task there is a field “Return Value Variable” where you put in a variable that gets the content of the %state variable from “Call HA get” Task
I can git it to work, but i have to execute the task 2 times in a row for it to work. If i only run it once, nothing happens. Anyone else experiences this behavior ?
Successful calls will return status code 200 or 201. Other status codes that can return are:
400 (Bad Request)
401 (Unauthorized)
404 (Not Found)
405 (Method not allowed)
Is that correct or am i missing something?
The only solution i can think of is to do a GET directly after the POST to get the current status or can it be done more simple?
I use the Join notifier to send me every state update for the entity_ids I define. While HTTP Get works I find the notifier approach is more streamlined.
Is Join notifier sending silent notifications then?
I don’t need an extra notification just to toggle a icon to show it’s status if you understand what i mean.
Yes, they’re silent. Meaning they utilize the AutoApps command system to update the global variables I’ve assigned in my setup. I use KWGT to display my current sensor states in a custom widget. For more pressing events, like door lock events or if a door stays open for more than 2 minutes, I use AutoNotification to generate custom notifications.
Here’s my motion and door sensor update automation:
I am trying to update my “input_datetime.flemming_phone_next_alarm_date_and_time”, but I can’t get it working. I have tried for days without any solution, the sensor will not update.
This is the closest I think is right, but it don’t work: par1 /api/services/input_datetime.set_datetime par2 {"entity_id":"input_datetime.flemming_phone_next_alarm_date_and_time","state":"%year-%month-%day %hour:%minute:00"}
Update. If I hard-code it like this it works: {"entity_id":"input_datetime.flemming_phone_next_alarm_date_and_time","date":"2019-10-31","time":"10:15:00"}
“Just” have to make the AutoAlarm variables work then
After some more work I can confirm this working: {entity_id":"input_datetime.flemming_phone_next_alarm_date_and_time","date":"%year-%month-%day","time":"%hour:%minute:00}
It turns out I disabled alarm during diagnosis and AutoAlarm variables don’t have a value if alarm is not set.