[] Toggle Modules ignore state when running On/Off functions

When a Toggle Module is set on, the “On” function is run. However, when a toggled-on Toggle Module is set on again, the “On” function is run again. While this behavior isn’t exactly wrong, it doesn’t match other IO behavior, such as the Counter Module. When the Counter Module reaches its max, it runs the “OnReachedMax” function. When the Counter Module is added to at max value, it doesn’t run “OnReachedMax” again.
This behavior also happens with the “Off” function as well.

Steps to Reproduce

  1. Create a Toggle Module.
  2. Connect the Toggle Module to a light (On → Toggle Light)
  3. Set the toggle module on multiple times.
  4. The light toggles despite the Toggle Module already being on.

What I expected to happen

The Toggle Module won’t run the “On” function when the Toggle Module is already on.

What happened

The Toggle Module will continue to run the “On” function despite being on.

Notes / Media

1 Like

This is now fixed in the next update.

Just checked this for, and the issue is still reproducible using the same setup in my first post.

1 Like

I have found the issue and it’ll be in the next update.