You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made some awsome state machines with your integration. The need for substates emerged 😎
The transitions package has support for conditional transitions. It would be great to have that exposed in this integration.
The conditional transitions in the package then have a callback. For the integration that probably becomes a little too exotic.
My proposal is to allow for an optional condition parameter in the statemachine definition. Like this:
The condition is_flammable could be added as a boolean attribute on the state machine sensor. And you could provide a service to set / get these attributes.
Maybe a conditions section can be aded to initialyze these attributes:
Update: thinking it over; adding Boolean attributes would work but still requires a lot of plumbing in the automation. Conditions based on the state of other entities is typically needed (ideally a template expression)
Use case example is a simple motion detection:
states: off, on, dimmed
But the conditions are triggering only at night and only if the light was not already on when motion is detected.
Modelling that in the state machine without conditions explodes the states and the triggers in the associated automation.
The conditions in this example just need to look up the state of sun.sun and the controlled light (for allowing the transition from off to on)
I made some awsome state machines with your integration. The need for substates emerged 😎
The transitions package has support for conditional transitions. It would be great to have that exposed in this integration.
The conditional transitions in the package then have a callback. For the integration that probably becomes a little too exotic.
My proposal is to allow for an optional condition parameter in the statemachine definition. Like this:
The condition
is_flammable
could be added as a boolean attribute on the state machine sensor. And you could provide a service to set / get these attributes.Maybe a conditions section can be aded to initialyze these attributes:
This would add support for a kind of sub states.
Best Eric
The text was updated successfully, but these errors were encountered: