Customize.yaml issue

I have been trying to use customize.yaml so I have configuration.yaml

###################################################
#                                                 #
#     Home Assistant  Configuration               #
#                                                 #
###################################################

homeassistant:
  name: !secret name
  temperature_unit: C
  time_zone: !secret timezone
  latitude: !secret home_latitude
  longitude: !secret home_longitude
  unit_system: metric
  elevation: !secret home_elevation
  customize: customize.yaml

###################################################
#                                                 #
#                     Panel                       #
#                                                 #
################################################### 

panel_iframe:
  configurator:
    title: Configurator
    icon: mdi:wrench
    url: !secret hassio_configurator_url
  ide:
    title: IDE
    icon: mdi:code-braces
    url: !secret hassio_ide_url
  tasmoadmin:
    title: TasmoAdmin
    icon: mdi:lightbulb-on
    url: !secret hassio_tasmoadmin_url

####################################################
#                                                  #
#                     Enables                      #
#                                                  #
####################################################

config:

http:
   base_url: !secret http_public_url
   ssl_certificate: !secret ssl_certificate
   ssl_key: !secret ssl_key
   ip_ban_enabled: True
   login_attempts_threshold: 3

conversation:
device_tracker:
  - platform: fritz
discovery:
history:
  exclude:
    entities:
      - sensor.no_updates
homekit:
ios:
logbook:
map:
sensor:
  - platform: yr
  - platform: speedtest
    monitored_conditions:
      - ping
      - download
      - upload
sun:
tts:
  - platform: google
updater:

####################################################
#                                                  #
#                 Customizations                   #
#                                                  #
####################################################

frontend:
    
####################################################
#                                                  #
#                     Recorder                     #
#                                                  #
####################################################

recorder:
  purge_interval: 2
  purge_keep_days: 5

####################################################
#                                                  #
#                      Cloud                       #
#                                                  #
####################################################

cloud:
ifttt:
  key: !secret ifttt_key

####################################################
#                                                  #
#                      MQTT                        #
#                                                  #
####################################################

mqtt:
  broker: core-mosquitto
  username: !secret mqtt_user
  password: !secret mqtt_psw

####################################################
#                                                  #
#                       Nest                       #
#                                                  #
####################################################

climate:
  - platform: nest
nest:
  client_id: !secret nest_clientID
  client_secret: !secret nest_clientSECRET

####################################################
#                                                  #
#                    Telegram                      #
#                                                  #
####################################################

telegram_bot:
  platform: polling
  api_key: !secret telegram_key
  allowed_chat_ids:
    - !secret telegram_chat_roby
    - !secret telegram_chat_erica

# Notifiche
notify:
  - name: roby_telegram
    platform: telegram
    chat_id: !secret telegram_chat_roby

####################################################
#                                                  #
#                    Includes                      #
#                                                  #
####################################################

group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
switch: !include switches.yaml

and my customize.yaml is:
###################################################
# #
# Sensors #
# #
###################################################

sensor.casina_thermostat_temperature:
      icon: mdi:fan
      friendly_name: Temperatura

sensor.casina_thermostat_humidity:
      icon: mdi:water-percent
      friendly_name: Umidità

climate.casina:
      friendly_name: Stato

###################################################
#                                                 #
#                     Speedtest                   #
#                                                 #
###################################################

sensor.speedtest_ping:
      friendly_name: Ping

sensor.speedtest_download:
      friendly_name: Download

sensor.speedtest_upload:
      friendly_name: Upload

I get the error:
Log Details (ERROR)

Sat Sep 15 2018 19:25:14 GMT+0200 (CEST)

Testing configuration at /config
Failed config
  homeassistant: 
    - expected a dictionary for dictionary value @ data['customize']
    - customize: customize.yaml
      elevation: 60
      latitude: XXXXXXXX
      longitude: XXXXXXX
      name: Casina
      temperature_unit: C
      time_zone: Europe/Rome
      unit_system: metric
Successful config (partial)
  homeassistant:

What can I do to fix the error?

You need to use one of the include options, eg

customize: !include customize.yaml
1 Like

Hello,

I’ll add on here.

I have friendly names set in customize.yaml but they only load if i go through the config --> customization route. Otherwise they use the generic sensor.xx
The offending entities are sensors created by appdeamon. Could it be that the sensors are created after the customize.yaml file is read ?

configuration.yaml

homeassistant:
  # Name of the location where Home Assistant is running
  name: Lyon Flat
  # Location required to calculate the time the sun rises and sets
  latitude: xx
  longitude: xx
  # Impacts weather/sunrise data (altitude above sea level in meters)
  elevation: 10000
  # metric for Metric, imperial for Imperial
  unit_system: metric
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: UTC+36
  # Customization file
  customize: !include customize.yaml

customize.yaml

sensor.msgid_0:
  friendly_name: Status
sensor.msgid_116:
  friendly_name: Burner starts
sensor.msgid_117:
  friendly_name: CH pump starts
sensor.msgid_118:
  friendly_name: DHW pump/valve starts
sensor.msgid_119:
  friendly_name: DHW burner starts
sensor.msgid_120:
  friendly_name: Burner operation hours
  unit_of_measurement: h
sensor.msgid_121:
  friendly_name: CH pump operation hours
  unit_of_measurement: h
sensor.msgid_122:
  friendly_name: DHW pump/valve operation hours
  unit_of_measurement: h
sensor.msgid_123:
  friendly_name: DHW burner operation hours
  unit_of_measurement: h
sensor.msgid_17:
  friendly_name: Relative modulation level
  unit_of_measurement: "%"
sensor.msgid_25:
  friendly_name: Boiler water temperature
  unit_of_measurement: °c
sensor.msgid_26:
  friendly_name: DHW temperature
  unit_of_measurement: °c
sensor.msgid_28:
  friendly_name: Return water temperature
  unit_of_measurement: °c
sensor.msgid_56:
  friendly_name: DHW setpoint
  unit_of_measurement: °c
sensor.msgid_57:
  friendly_name: Max CH water setpoint
  unit_of_measurement: °c

Cheers

Matthew