Splitting customize in configuration

Hi! Trying to split my configuration file and get stuck on customize:

In my configuration.yaml I wrote:

customize: !include customizing.yaml

My customizing.yaml includes this.

- sensor.yr_humidity:
    friendly_name: Luftfuktighet
    icon: mdi:water-percent
- sensor.yr_temperature:
    friendly_name: Tempertur
    icon: mdi:temperature-celsius
- sensor.yr_wind_speed:
    friendly_name: Vindhastighet
    icon: mdi:weather-windy
- sensor.yr_condition:
    friendly_name: Nederbörd
    icon: mdi:weather-rainy
- sensor.yr_precipitation:
    friendly_name: Nederbörd
    icon: mdi:weather-rainy
- sensor.yr_symbol:
    friendly_name: Väderlek
- sun.sun:
    friendly_name: Sol
    hidden: true
- device_tracker.linuxlan:
    icon: mdi:raspberrypi
- device_tracker.philipslan:
    icon: mdi:lightbulb
- device_tracker.routerlan:
    icon: mdi:router-wireless
- device_tracker.tivoe800d5bf0c82f56lan:
    icon: mdi:monitor
- device_tracker.android8f3ebbf27d050e6flan:
    icon: mdi:tablet-android
- device_tracker.arbetsrumlan:
    icon: mdi:laptop
- device_tracker.madeleinesmbplan:
    icon: mdi:laptop-mac
- device_tracker.mediaserverlan:
    icon: mdi:server

In my loggfile i found this
homeassistant.bootstrap: Invalid config for [homeassistant]: Expected dictionary for dictionary value @ data[‘customize’]. Got [OrderedDict([(‘sensor.yr_humidity’, OrderedDict([(‘friendly_name’, ‘Luftfuktighet’), (‘icon’, ‘mdi:water-percent’)]))]), OrderedDict([(‘sensor.yr_temperature’, OrderedDict([(‘friendly_name’, ‘Tempertur’), (‘icon’, ‘mdi:temperature-celsius’)]))]), OrderedDict([(‘sensor.yr_wind_speed’, OrderedDict([(‘friendly_name’, ‘Vindhastighet’), (‘icon’, ‘mdi:weather-windy’)]))]), OrderedDict([(‘sensor.yr_condition’, OrderedDict([(‘friendly_name’, ‘Nederbörd’), (‘icon’, ‘mdi:weather-rainy’)]))]), OrderedD… (See /var/opt/homeassistant/configuration.yaml:3)

When pasting code in the forum, you need to use the Preformatted Text option on the toolbar of the editor, it looks like this icon:

</>

Otherwise we can not tell the spacing and formatting you used in your configuration.yaml

Hilight the code and click that button so we can see your code how it really is

Other than the dashes, it looks correct.


Under sensors and devices? I

icon, fiendley_name?

Change the file name to customize.yaml and make sure customize: ! include customize.yaml is directly under time_zone: and not with your other ! includes.

1 Like

Here’s the first section of my customize.yaml (not going to post the whole thing because it’s long):

#######################################
#                                     #
# Customizations                      #
#                                     #
#######################################
#
# Sensors
#
#
# Forecast.io
 sensor.forecastio_cloud_coverage:
   friendly_name: Cloud Coverage
   icon: mdi:cloud-outline
 sensor.forecastio_humidity:
   friendly_name: Outdoor Humidity
   icon: mdi:water
 sensor.forecastio_pressure:
   friendly_name: Barometric Pressure
   icon: mdi:nature
 sensor.forecastio_temperature:
   icon: mdi:thermometer
   friendly_name: Outdoor Temp
 sensor.forecastio_wind_speed:
   icon: mdi:weather-windy
   friendly_name: Wind Speed
 sensor.forecastio_summary:
   friendly_name: Condition
 sensor.forecastio_ozone:
   friendly_name: Ozone Levels
 sensor.forecastio_precip_probability:
   friendly_name: Prob of Precip
   icon: mdi:water-percent
 sensor.forecastio_precip:
   friendly_name: Precip Type
   icon: mdi:weather-rainy
 sensor.forecastio_precip_intensity:
   friendly_name: Precip Intensity
   icon: mdi:weather-pouring
 sensor.forecastio_visibility:
   friendly_name: Visibility
   icon: mdi:weather-fog
 sensor.forecastio_nearest_storm_distance:
   friendly_name: Nearest Storm
   icon: mdi:weather-lightning
 sensor.forecastio_wind_bearing:
   friendly_name: Wind Bearing
   icon: mdi:apple-safari
 sensor.forecastio_apparent_temperature:
   friendly_name: Real Feel
   icon: mdi:account-alert
 sensor.forecastio_dew_point:
   friendly_name: Dew Point
   icon: mdi:oil-temperature

This is the big one that everybody misses first time around. :wink:

Edit: Myself included. :slight_smile:

2 Likes

I know I did!

1 Like

Now it works! Thanx!

1 Like

Is it required to have a single space for the 1st level of indent?

This worked for me. But I don’t get the logic as to why I should have a single leading space on each line i customize.yaml. In my head there should be either zero spaces or two spaces.

Can anyone explain?

1 Like