Multiple classes in single file


I’am working python statemachine with multiple classes in a single file.
Is this possible?
How should ik configure the apps.yaml file with multiple classes?

Any help would be great,


Yes, I do it now.

Simply name the module, then the class you want to use in that file.

TBH, I don’t understand why you need to ask the question, the documentation seems quite clear. Are you having a problem with it somewhere?

Hi gpbenton,

Thanks for the answer, but I’m not sure if i need to add multiple classes:

  module: statemachine
  class: state,base

or split it

  module: statemachine
  class: state

  module: statemachine
  class: base

Each section in the apps.yaml defines one app (an instance of the class in the definition). So the second version is what you need (and what I have).

1 Like