Hello everyone, I’m an absolute beginner and unfortunately I don’t know where to start looking for the many possibilities.
I have built a switch that sends a restful command when pressed (scan a library). This library returns the code 204 if everything is good.
The question now is how could I modify the switch so that this confirmation is somehow visible, e.g. green light on success or red light on failure? The switch would of course have to be reset after a certain time for a new scan.
Invalid config for ‘rest’ from integration ‘sensor’ at configuration.yaml, line 26: value must be one of [‘GET’, ‘POST’] for dictionary value ‘method’, got ‘post’
And, how can I integrate this sensor in homeassistant. And where I have to add the response code “204”? A guide for dummies would be useful.
As the error states, you have set the method as post which is not one of the valid options… it needs to be POST.
You can use the value_template configuration variable to return your desired state values for whatever is returned from API call. The exact setup of the template will depend on the exact value being returned by the call.