I have an external sensor running a web server that provides sound measurements. How I used to have it set up in HA is that I would have a rest sensor in my configuration.yaml file. All worked well, but for some reason the scan_interval of only the first sensor was used. So if I had a sensor for 5 seconds first and then a sensor with an interval of 5 minutes it wouldn't respect the 5 minutes and still scan it every 5 seconds. Not sure why, but I wanted to move away from that to begin with.
Now I'm trying to set up a rest_command in the configuration.yaml file and a template sensor. An automation calls the command, for example rest_command.get_sound_level and it should update the sensor.
The issue I'm running into is that I can't seem to be able to call the rest command from an automation. I've tried following the docs, but it doesn't seem to completely match up with what I'm supposed to put into the automation editor (both in visual and yaml mode)
In my configuration.yaml file I have:
rest_command:
get_sound_level:
url: http://192.168.2.46:3000/sound
Question is basically just how do I set up the template in the configuration.yaml file and how do I make an automation use the rest command to update the sensor? I've been trying thins for hours now, but the more forum posts and docs I read, the more confused I get. Especially because even after verifying the configuration.yaml file and restarting HA, automations doesn't seem to recognize the rest command.