I am new in HA & not a programmer at all
I am trying to add an HTTP temperature sensor
I received from the vendor this to add to configuration.yaml, but it does not work:
dorest: - resource: http://192.168.1.67/temp/
scan_interval: 30
sensor: - name: obyvak_teplomer
unique_id: "TEMP1"
value_template: "{{ value_json.temp }}"
device_class: temperature
unit_of_measurement: "C"
I realized I need to create sensor.yaml file and direct there, so I have:
configuration.yaml:
# Loads default set of integrations. Do not remove.
default_config:
# Load frontend themes from the themes folder
frontend:
themes: !include_dir_merge_named themes
# Text to speech
tts:
- platform: google_translate
sensor: !include sensor.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
and sensor.yaml:
dorest: - resource: http://192.168.0.3/temp/
scan_interval: 30
- sensor:
- name: "Bazen_voda"
unique_id: "TEMP1"
value_template: "{{ value_json.temp }}"
device_class: temperature
unit_of_measurement: "C"
But I am getting āInvalid config for [sensor]: required key not provided @ data[āplatformā]. Got None.ā error.
How is it correct?
Tinkerer
(aka DubhAd on GitHub)
April 12, 2023, 11:16am
4
Unfortunately what they gave you is ā¦ suspect to say the least. Thereās no ādorestā platform. I guess they were aiming for a restful sensor , but if so they missed it by quite a lot.
petro
(Petro)
April 12, 2023, 12:05pm
5
All of that is wrongā¦ where did you get it from?
from the very local vendor manufacturing wifi thermometresā¦
Long story short - after many years of using z-wave VeraPlus I cannot find a reliable thermometer for a swimming pool. This guy is manufacturing them and has this manual to add the thermometer to HAā¦
How should it be correctly written?
petro
(Petro)
April 12, 2023, 12:11pm
7
I have no idea what itās trying to do.
If itās the rest integration, it shouldnāt even be inside sensor.yaml. It should be in configuration.yaml.
And what is dorest
???
I guess, it is supposed to link HA to the sensorās url, but I do not understand the correct syntax of how it should be doneā¦
petro
(Petro)
April 12, 2023, 12:21pm
9
Where did you get the syntax from? It seems like you just made it up. We need to understand what itās doing so that we can help you. Post where you got it from, with details on how you came up with it.
petro
(Petro)
April 12, 2023, 12:24pm
11
Please observe the images in that resource. It has the proper syntax, placement, and spacing.
1 Like
I see: in the manual text is ādorestā and in the picture is ārestā - it works now!
Thanks a lot!
1 Like