interval:
- interval: 1min
then:
- http_request.post:
url: !lambda |-
char buf1[64];
char buf2[64];
sprintf(buf1, "%0.1f", id(hum).state);
sprintf(buf2, "%0.1f", id(temp).state);
return ((std::string) "https://api.thingspeak.com/update?api_key=1234567890234567&field1=" + buf1 + "&field2=" + buf2).c_str();