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
Let's say for example my machine represents a light bulb. The two obvious states would be 'on' and 'off'.
But, if the bulb is dimmable and the dimmer value is some value between 1 and 100 how would I handle this 'second state' that a bulb has?
I think defining the states ['on_1', 'on_2', 'on_3'.., 'on_100'] would be suboptimal. Is there a better way?
The text was updated successfully, but these errors were encountered:
Why does the dimness of the light bulb have to be a state at all? You should use the variable “brightness” in the internal logic of the on state.
The value of the brightness doesn’t matter to be able to transition to the off state. All 100 brightness levels transition to the off state, is that right ? Or do they transition to one another ?
I would design the architecture such that you do not have a need for any other state other than on / off
Let's say for example my machine represents a light bulb. The two obvious states would be 'on' and 'off'.
But, if the bulb is dimmable and the dimmer value is some value between 1 and 100 how would I handle this 'second state' that a bulb has?
I think defining the states ['on_1', 'on_2', 'on_3'.., 'on_100'] would be suboptimal. Is there a better way?
The text was updated successfully, but these errors were encountered: