lazcad / homeassistant

Home Assistant Development
249 stars 83 forks source link

can't add friendly names #1

Closed 3ZVK closed 7 years ago

3ZVK commented 7 years ago

hello,

when I setup configuration.yaml as follow :

xiaomi :
  key: 42CFXXXXXXXXX
  customize:
    binary_sensor.switch_158d0xxxxxxx:
        friendly_name: Switch 1

I get :

16-12-26 09:30:59 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [xiaomi]: [customize] is an invalid option for [xiaomi]. Check: xiaomi->xiaomi->customize. (See /home/hass/.homeassistant/configuration.yaml:43). Please check the docs at https://home-assistant.io/components/xiaomi/

crisone commented 7 years ago

cusomize settings should be placed in the first section of the configuration.yaml like this

homeassistant:
  # Omitted values in this section will be auto detected using freegeoip.io

  # Location required to calculate the time the sun rises and sets
  latitude: !secret latitude_home
  longitude: !secret longitude_home
  elevation: 322
  # Name of the location where Home Assistant is running
  name: Home
  # C for Celcius, F for Fahrenheit
  temperature_unit: F
  # Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
  time_zone: America/New_York
  unit_system: imperial
  customize: 
    binary_sensor.switch_158d0xxxxxxx:
    friendly_name: Switch 1

or you can use a split file to include all the cusomize settings:

 customize: !include customize.yaml
3ZVK commented 7 years ago

thank you got it working thanks to you format is

  unit_system: imperial
  customize: 
    binary_sensor.switch_158d0xxxxxxx:
      friendly_name: Switch 1