(--------)
You can do like this:
@startumlhide empty descriptionskinparam state {BackgroundColor<<History>> Yellow}State OffState Off : Entry: x.PowerLed(false);State Off : Exit: x.Dummy1();State On {state "H" as On_H <<History>>state "Step1" as On_Step1state "Step2" as On_Step2state "Step3" as On_Step3[*] -right-> On_Step1On_Step1 -right-> On_Step2On_Step2 -right-> On_Step3On_Step3 -> [*]}State On : Entry: x.PowerLed(true)[*] -> OffOff -up-> On_H : SwitchOnOn -> Off : SwitchOff@enduml
@startuml
hide empty description
skinparam state {
BackgroundColor<<History>> Yellow
}
State Off
State Off : Entry: x.PowerLed(false);
State Off : Exit: x.Dummy1();
State On {
state "H" as On_H <<History>>
state "Step1" as On_Step1
state "Step2" as On_Step2
state "Step3" as On_Step3
[*] -right-> On_Step1
On_Step1 -right-> On_Step2
On_Step2 -right-> On_Step3
On_Step3 -> [*]
State On : Entry: x.PowerLed(true)
[*] -> Off
Off -up-> On_H : SwitchOn
On -> Off : SwitchOff
@enduml
Ok, but what about the diamond shape to model choices? https://www.uml-diagrams.org/state-machine-diagrams.html#choice-pseudostate
I am only a user, but it is currently not possible to use diamond shape to the best of my knowledge. Please create a new request
Actually there is a solution, one can use the <<choice>> pseudostate. I found it here:
https://forum.plantuml.net/3672/state-diagram-decision-and-crossing?show=3672#q3672
Thank you PlantUML Team!