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

Multiple instances of an app #646

Open
bjornorri opened this issue Oct 20, 2024 · 0 comments
Open

Multiple instances of an app #646

bjornorri opened this issue Oct 20, 2024 · 0 comments

Comments

@bjornorri
Copy link

I'm an AppDaemon user and have been looking into using pyscript instead.

One thing I love about AppDaemon is the ability to instantiate an app multiple times with different parameters:

bedroom_light_control:
  module: light_control
  class: LightControl
  binary_sensor: binary_sensor.bedroom_occupied
  area_id: bedroom
  ...

bathroom_light_control:
  module: light_control
  class: LightControl
  binary_sensor: binary_sensor.bathroom_occupied
  area_id: bathroom
  ...

It seems to me that pyscript doesn't support this. The documentation shows an example of apps with multiple sets of parameters, but it looks like the "parallelization" needs to be implemented by the app itself.

I find this problematic because:

  1. It is complex. I want to focus on the logic of my app and avoid extra logic and boilerplate.
  2. If one "instance" of my app crashes, they all crash. If they were actually running as separate instances, the failure would be isolated.

Is it correct that this kind of multi-instantiation is not supported in pyscript? Is it something you would consider supporting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant