Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 102441

Response of rest_command

$
0
0

@Michael_Davydov wrote:

Hi!

I have a script that runs a rest_command and then sends me a notification about it’s success. But obviously it will only fail if there’s a serious error in rest_command, and I’d be oblivious to other possible response-errors that it may have.

Is there a way to get response of the rest_command (post in my case) and then show it in notification? Or write it to disk into a file or whatever. With hass tools.

I suppose worst case scenario I can instead use an approach like:

  • Run external python script that POSTs to a website and writes response on disk into a txt file
  • Delay up to 10 seconds to give time for POST to complete (whatever timeout time is set)
  • Read the file and send it’s contents in notification

But it would be cool if I could avoid using python for this

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 102441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>