Skip to content

Question: what is the expected format of included config file? #153

Closed
@wsw70

Description

@wsw70

The documentation states

It is recommended you put your pyscript configuration its own yaml file in the pyscript folder.

I have a working pyscript section in configuration.yaml:

pyscript:
  allow_all_imports: true
  hass_is_global: true
  zigbee:
    light:
      salon_interrupteur_canape:
        single:
          - group.salon,off
          - group.salon_avant,toggle
        double:
          - group.salon,toggle
(...)

I tried to create a pyscript/config.yaml file with

  allow_all_imports: true
  hass_is_global: true
  zigbee:
    light:
      salon_interrupteur_canape:
        single:
          - group.salon,off
          - group.salon_avant,toggle
        double:
          - group.salon,toggle
(...)

and include it configuration.yaml as:

pyscript:
  config: !include pyscript/config.yaml

It did not work, there were errors about missing entries in the configuration that I call for instance as pyscript.config['zigbee']['light'].keys() (to use the config above).

I then tried to move allow_all_imports: true and hass_is_global: true into configuration.yaml and other similar combinations but I never actually managed to have the separate file working.

  • what should be its format?
  • should it only include the apps configuration? Or also allow_all_imports: true and hass_is_global: true
  • should I change the way I call the configuration variables in my apps?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions