I am new on Home assistant. I am trying to do exactly the same as restful documentation with jsontest date and time (https://www.home-assistant.io/integrations/rest/, part “Fetch multiple JSON values and present them as attributes”).
I have the following on a custom sensor which publish this on http request :
{ "temperature": 23.1, "humidity": 42.2 }
So I have made the following code under sensor on configuration.yaml :
Hello.
Thank you for the answer.
The DHT22 is correct. In the devellopment tool / state menu, I have this :
humidity: 53.9
unit_of_measurement: °C
friendly_name: DHT22
So I have tried your code for the hudimity sensor : at configuration chek I have this error :
Error loading /config/configuration.yaml: while parsing a block mapping
in "/config/configuration.yaml", line 59, column 7
expected <block end>, but found '<scalar>'
in "/config/configuration.yaml", line 60, column 39
line 59, column 7 ==> correspond to the f of the line friendly_name
line 60, column 39 ==> correspond to the s in bold : sensor.dht22 of the line value_template.