Hey there.
I tried my best and got my first api integration running. I could only extract a numeric number from a total of calls (app used for emergency dispatch). Like: total number of calls „…“.
This will only go up with every new call.
The idea is to fire an automation, everytime there is a new call, so the number is grater then before.
For example:
Sensor value is set to 10
There is a new call, sensor will go to 11.
Then the automation would fire. (Maybe with the condition that I’m home…)
The new value would be 11 and it should fire when the new value of 12 comes up.
I can’t get my head around it.
I’m sorry for my bad English, I’m not a native speaker.
PERFECT - Thank you so much, it works!
Would it be possible to like “turn on a virtual switch”? Or sensor? So that i could make a lovelace popup when there is an alarm for a certain time? Or any other idea to visualize the alarm?
You can set the actions to do whatever you need them to do.
If your goal is to have it act more like a binary sensor, there are other ways to do it that are a little “cleaner” but they are a bit more complicated to explain.
So I assume I could switch a virtual button for a amount of time to on an then back to off ? Or ist there a nicer way to do this ?
I’m willing to read, but I don’t know where to start.
The Goal is the following:
Our vouluntary EMS gets their (our) calls via an App. The App has an api which delivers Data from the call and a counter on how many calls you got in total. The Idea would be to get Alexa to announce if there is an Alarm. I did this via the Automation you wrote above.
I also wanted to have my tablets display that there is an alarm going on, so i thought it would be easier to have a boolean sensor which switches to on if the number goes up (like with your automation) and use this sensor for a card which only comes up when there is an active alarm for a couple of minutes and then dissapers.
I hope I got the Information you need
For a standard conditional card, one option would be to use a Timer helper. Once you have created the helper, set the condition in the card to be that the timer’s state is ‘active’. Then you would add a timer.start service to your original automation’s action section.