Replies: 4 comments 4 replies
-
Hi @iamgodot , how are you? Thanks for clarifying this. Yes, this is the current behavior. My thoughts were that "before" and "on" runs while the transition is executed, and can be perceived as a method call for simple machines. Ex: Imagine that you have The other caveat is that since 2.0 we run the state machine on "RTC model" (run to completion), this means that there's an internal queue (more on docs) and you can now call events while processing other events and they will be queued. On RTC, only the main event will get its value returned, and the chained ones will simply return Go ahead, it will really help getting this info clearly on the docs! Thank you! |
Beta Was this translation helpful? Give feedback.
-
@fgmacedo Hi, thanks for asking, I'm great. Actually I was expecting the return value of I'll start a pull request for this improvement. As for RTC model, may I take that Non-RTC ones come with opposite logic? Meaning chained events will get expected return values as well? Appreciate for your quick reply, I think this is a great project :) |
Beta Was this translation helpful? Give feedback.
-
Hello, I am French: so I translate with Google. your state machine interests me I'm new to the world of python programming for my raspberrypi (4), and I would like to create a state machine for my reversible air conditioning (I created the code in C for arduino). |
Beta Was this translation helpful? Give feedback.
-
Hi, as the OP of this discussion I suggest you open a new one for your question, since I'm closing this one. BTW, what you're doing looks pretty cool so best of luck to that :-) |
Beta Was this translation helpful? Give feedback.
-
I read the doc and found it's not very clear about the effects of return values of actions. Now I'm understanding that the returns of
before
&on
actions will be combined as a list when a transition is triggered, yet forafter
&on_enter
&on_exit
there's no point to return anything.Am I getting everything correct? BTW I'd like to refine the docs if needed. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions