Yaml error mapping

I did editor as per samnewman86 post , tts: line 6 `-platform: google_translate line 7.

I check and then restarted server and now i have Configuration Valid.

Thank you all for your support and patience .`

Once thing left:

unit_of_measurement: "*C"

at the sensorā€™s config should be

unit_of_measurement: "Ā°C"

Thank you spotting it.

All working ok now?

Yes Thank you, just need to download a thermostat custom card then i can install the Sonoff TH switch and sensor. I just learning all the time.

Thanks again for your help.

Hi sorry to trouble you again, i put 2 lines in the yaml using File Editor and again it gives OK green tick when i check thru Configurator it comes up with error on line 31, I have checked and checked again but cannot find the error perhaps you can help.

Configuration invalid

Invalid config for [sensor]: required key not provided @ data['platform']. Got None. (See /config/configuration.yaml, line 31).# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:

# Text to speech
tts:
 - platform: google_translate

# services
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml





Switch:
  - platform: "mqtt"
    name: "Pond"
    state_topic: "tele/pond/state"
    command_topic: "cmnd/Pond/power"
    payload_on: "on"
    payload_off: "off"
    availability_topic: "tele/Pond/LWT"
    payload_available: "online"
    payload_not_available: "offline"
    qos: 1

Sensor:
  - platform: "mqtt"
    name: "Pond Temperature"
    state_topic: "tele/pond/Hass_State"
    value_template: "{{value_json['DS18B20'].Temperature}}"
    unit_of_measurement: "Ā°C"
    availability_topic: "tele/Pond/LWT"
    payload_available: "online"
    payload_not_available: "offline"
    device_class: "temperature"
  

  - url: /hacsfiles/lovelace-thermostat-dark-card/thermostat-dark-card.js
    type: module ```

The last two lines shouldnā€™t be there at all, delete them. Also switch and sensor should be lowercase.

What are you trying to do with those last two lines.
They are currently part of the list of sensors

Looks like heā€™s trying to use a custom plugin.

lovelace:
  mode: yaml
  resources:
    - url: /hacsfiles/lovelace-thermostat-dark-card/thermostat-dark-card.js
      type: module

@mwy6283 Iā€™d suggest using the UI for lovelace until you get a handle on YAML.

1 Like

Hi all

Thank for the quick reply, Yes i have downloaded a thermostat in UI Lovelace yaml i read that i had to include this in yaml obviously i did not understand this correctly . Now that i have removed the two lines I am back to where i was yesterday with a valid Configuration. I thought i need to direct the switch and seƱor to the thermostat-card. Hopefully when i connect the switch and sensor up . i will get the readings
Apologise to you all.

Make sure you get those lines into your lovelace resources (either in YAML or UI whichever you choose) or your thermostat card wonā€™t work. Donā€™t forget to clear your browser cache too.