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?