Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't define scene in multiple packages? #6641

Closed
AnderssonPeter opened this issue Mar 15, 2017 · 4 comments · Fixed by #6830
Closed

Can't define scene in multiple packages? #6641

AnderssonPeter opened this issue Mar 15, 2017 · 4 comments · Fixed by #6830

Comments

@AnderssonPeter
Copy link

Home Assistant release (hass --version):
0.40.0

Python release (python3 --version):
3.6.0

Component/platform:
Packages

Description of problem:
I tried to model my configuration using one package per room, this way its easy to navigate the files.
But it seems im not allowed to add the scene component to multiple packages?

Expected:

Problem-relevant configuration.yaml entries and steps to reproduce:
The following works:

homeassistant:
  packages:
    room1:
      input_boolean:
        room1_test:
          name: test1
          initial: off
    room2:
      input_boolean:
        room2_test:
          name: test2
          initial: off

But the following does not:

homeassistant:
  packages:
    room1:
      input_boolean:
        room1_test:
          name: test1
          initial: off
      scene:
        - name: test1_on
          entities:
            input_boolean.test1: on
    room2:
      input_boolean:
        room2_test:
          name: test2
          initial: off
      scene:
        - name: test2_on
          entities:
            input_boolean.test2: on

What makes scene so different i as switch, automation, group and input_boolean all work great.

[31m17-03-15 17:44:08 ERROR (MainThread) [homeassistant.config] Package room2 setup failed. Component scene may occur only once and it already exist in your main config (See C:\Users\...\AppData\Roaming\.homeassistant\configuration.yaml:23).
@christianwaite
Copy link

I'm also trying to split my config into 'per room or area' and hit the same problem.
It'd be nice to get 'customize' working in packages as well.

@AnderssonPeter
Copy link
Author

AnderssonPeter commented Mar 21, 2017

@christianwaite
customize is working as intended for me!
i have the following package.yaml file for each room and it contains

homeassistant:
  customize: !include customize.yaml

then customize.yaml has this content:

switch.outside_light1:
  icon: mdi:tree
  friendly_name: Träd
switch.outside_light2:
  icon: mdi:led-off
  friendly_name: Terrass

but as scene's don't work i just wrote some scripts instead and they seem to do the job so far even if its alot more yaml code needed..

@christianwaite
Copy link

Ahh yes! I was missing the 'homeassistant:' bit before 'customize'.
Thanks!

@AnderssonPeter
Copy link
Author

As this is now closed does that mean it will be included in the next release? It would be nice to use scenes instead of verbose scripts.

@home-assistant home-assistant locked and limited conversation to collaborators Jul 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants