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
Thanks, @majkrzak, for providing a solution. From the first glance it looks quite elegant. Do you have any ideas how conditions has be aded to the diagram output?
I don't have any free time at the moment to integrate this, but when I do I'll look into integrating your change into the codebase.
It's fairly complex and adds a lot of new code, but it tries to produce nice uncluttered diagrams.
Algorithm
Basically what I'm doing is adding (? CONDITION) to the label.
If it's a lambda, I remove the "return" part and the semicolon to save space.
If it is a sensor or number in_range, I take the ID and output something like (? 60.0<component_id<100.0)
If it's something else, then I remove the part before the dot(Unless it is very short), so "binary_sensor.is_on" becomes "is_on", and then add the argument, if it's an ID, So we get something like "is_on fooSensor".
Finally, if it is still too long, you get a (? truncated_text_here[1]), and then the full condition goes in a footnote.
I would like to suggest an enhancement, which I fill may be extremely useful.
Adding possibility to specify the
condition
parameter for transitions, like:The text was updated successfully, but these errors were encountered: