Need help with extra sensors.yaml

Hello,

i’m trying to split my config file for my sensors.

i’m only having 2 extra sensors in there, but i keep getting problems with them.

in the configuration.yaml i specified:
sensor: !include sensors.yaml

the content of sensors.yaml is

- platform: template
    sensors:
        speedtest_last_updated:
            friendly_name: "Last Updated"
            value_template: "{{ as_timestamp(states.sensor.speedtest_download.last_updated) | timestamp_custom('%I:%M %p %Z') }}"
- platform: fronius_inverter
    ip_address: 192.168.112.104

can someone tell me why i keep getting the following error:
2020-06-05 18:17:44 ERROR (MainThread) [homeassistant.components.hassio] Error loading /config/configuration.yaml: mapping values are not allowed here
in “/config/sensors.yaml”, line 2, column 15

thank you!

sensors on line 2 should be moved back 1 or to spaces. See the docs for an example.

edit: the lines below will need to be adjusted also.

Your indentation is a bit off:

- platform: template
  sensors:
    speedtest_last_updated:
      friendly_name: "Last Updated"
      value_template: "{{ as_timestamp(states.sensor.speedtest_download.last_updated) | timestamp_custom('%I:%M %p %Z') }}"
- platform: fronius_inverter
    ip_address: 192.168.112.104

Also your second sensor looks nothing like the core fronius sensor. Is this a third party integration?

@tom_l
i’m using https://github.com/safepay/sensor.fronius to add. i’m trying the core sensor now !!

@tom_l

no luck with default…
error:

  • Error loading /config/configuration.yaml: mapping values are not allowed here in “/config/sensors.yaml”, line 2, column 15
  • Error loading /config/configuration.yaml: mapping values are not allowed here in “/config/sensors.yaml”, line 2, column 12
  • Error loading /config/configuration.yaml: mapping values are not allowed here in “/config/sensors.yaml”, line 7, column 15
  • Error loading /config/configuration.yaml: mapping values are not allowed here in “/config/sensors.yaml”, line 7, column 13
- platform: template
  sensors:
    speedtest_last_updated:
      friendly_name: "Last Updated"
      value_template: "{{ as_timestamp(states.sensor.speedtest_download.last_updated) | timestamp_custom('%I:%M %p %Z') }}"
- platform: fronius
    resource: "http://192.168.112.104"
    monitored_conditions:
    - sensor_type: inverter

You really need to pay closer attention to your indentation, look at yours then look a the example:

  - platform: fronius
    resource: FRONIUS_URL
    monitored_conditions:
    - sensor_type: inverter

Thanks Tom_I that worked!

Going to have to look for that identation rules then…

@tom_l
little bit off-topic, but how do i remove the old read_only entities so they don’t fill up…