Check URL for content and then take action

Hello Home Assistant-world,
i would like to build a switch for a heating control.
I’ve got it done so far and it’s running. But I have to rely on the URL to work.

I built a switch with url and built the control buttons via rest_command.

  - platform: command_line
        command_on: "/usr/bin/curl -X GET"
        command_off: "/usr/bin/curl -X GET"
        friendly_name: Heizung
    url: ""
    url: ""
    url: ""

Now I’m looking for a way to check the URL for correctness, that the action was really executed.
On the web page of the URL (all URLs), the following is output when executed correctly:


How can I use this in Home Assistant?
Does somebody has any idea?

is there any other web page you can get current state? As far as i know, you want two different solutions at once;

  1. rest command to call web pages to initiate an event
  2. restful sensor to read the output of web call and expose as sensor (binary sensor or just sensor)
    if you can find a rest endpoint to get the status (on,off) and heat level (1,2,3), you can create restful sensor following here: RESTful Sensor - Home Assistant

P.S.: you can convert your switch into restful switch to standardize your implementation: RESTful Switch - Home Assistant