Hi,
progressing a bit with the setup, but have some questions…
I have two objectives with my HA effort; being able to manually toggle lamps with presets, and having automation conditionally doing it for me. I am using Philips Hue.
Starting with the manual scenario
While reading up on configuration, it was stated that each entity should be defined in the configuration.yaml. Question being, how do I do it? I find examples, but none which depicts this?
I tried to add two files;
lights: ~/.homeassistant/light.yaml
group: ~/.homeassistant/groups.yaml
and imported them by adding following to configuration.yaml:
“light: !include light.yaml”
“group: !include groups.yaml”
Judging from the log below the contents of those are obviously not correct…
Jan 06 22:45:55 hassbian systemd[1]: Started Home Assistant for homeassistant.
Jan 06 22:45:57 hassbian hass[3675]: 2019-01-06 22:45:57 ERROR (Thread-2) [homeassistant.util.yaml] mapping values are not allowed here
Jan 06 22:45:57 hassbian hass[3675]: in "/home/homeassistant/.homeassistant/light.yaml", line 2, column 13
Jan 06 22:45:57 hassbian hass[3675]: 2019-01-06 22:45:57 ERROR (MainThread) [homeassistant.bootstrap] Error loading /home/homeassistant/.homeassistant/configuration.yaml: mapping va
Jan 06 22:45:57 hassbian hass[3675]: in "/home/homeassistant/.homeassistant/light.yaml", line 2, column 13
Jan 06 22:45:57 hassbian hass[3675]: 2019-01-06 22:45:57 INFO (MainThread) [homeassistant.core] Starting Home Assistant
Jan 06 22:45:57 hassbian hass[3675]: 2019-01-06 22:45:57 INFO (MainThread) [homeassistant.core] Timer:starting
Loading HA in my browser happily stated that neither ‘light’ nor ‘group’ could be set up…
I have looked through what I could find on “home-assistant.io” but did not find the correct syntax, please help.
I do have the config for the bridge you sent already in place. If I uncomment the light.yaml & groups.yaml, it loads and present my lamps on the dash, but I thought it was possible to group lights in HA as well…
I thought it was going to be easier configuring something nice with HA instead of the different apps for hue… Guess I was wrong then?
You can group the lights, using either groups or light_groups in your configuration, but that’s not what you are doing in your light.yaml, you are trying to declare a light/hue platform that doesn’t exist, hence why it doesn’t load.
Thanks, that sounds hopeful. I did look at the examples here: https://www.home-assistant.io/components/group/ which I tried to translate into the groups.yaml file above. I do know how extremely picky yaml is with syntax.
I got this when syntax checking the file…
Invalid config for [group]: expected a dictionary for dictionary value @ data['group']. Got [OrderedDict([('lamp', None), ('name', 'Lamp'), ('view', True), ('entities', ['light.one', 'light.two'])])]. (See /home/homeassistant/.homeassistant/configuration.yaml, line 113). Please check the docs at https://home-assistant.io/components/group/
It getting late, I have to continue this tomorrow. Thanks for the help so far, if you have an idea of the above misconfig it’d be great.
Thanks
This will create a new tab with two cards in it, and hopefully you can work out how the code relates to what you see on the screen and take it from there
I realise I have mine defined as a light group, not a group. You should probably do the same as the light group is designed precisely for, ummm, groups of lights!
Hi, agreed. I chose mf_social’s config above, but appreciate the links you mention. I will definitely read up on the hue, as I had a bit of a struggle to get it going. Guess I must have found some old posts as you suggests. Hope I will find lots of useful stuff in there!
Thanks!