xiaohuim / homeassistant-magicblue

MagicBlue custom component for Home Assistant
14 stars 13 forks source link

[FIXED] Configuration invalid: 'mapping values are not allowed here' #5

Open h93 opened 6 years ago

h93 commented 6 years ago

Magicblueshell runs fine. I copied magicbluelight.py to /custom_components/light/magicbluelight.py

This is the corresponding part of my configuration.yaml:

light:
  platform: magicbluelight
    name: 'Living Room'
    address: c9:b1:90:af:19:c9
    version: 8

However this is what 'Configuration Validation' in Home Assistant shows: (line 73, column 9 is between 'name' and ':'.)

Configuration invalid.CHECK CONFIG

Testing configuration at /home/homeassistant/.homeassistant 2018-01-24 06:08:35 ERROR (MainThread) [homeassistant.bootstrap] Unable to setup error log /home/homeassistant/.homeassistant/home-assistant.log (access denied) 2018-01-24 06:08:35 ERROR (Thread-1) [homeassistant.util.yaml] mapping values are not allowed here in "/home/homeassistant/.homeassistant/configuration.yaml", line 73, column 9 2018-01-24 06:08:35 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping values are not allowed here in "/home/homeassistant/.homeassistant/configuration.yaml", line 73, column 9

Edit: Fixed by adding a hyphen before 'platform' (It's missing under configuration instructions), so now it looks like this:

light:
  - platform: magicbluelight
    name: 'Living Room'
    address: c9:b1:90:af:19:c9
    version: 8

Sorry, I'm new to YAML