Will a trigger rule fire even if my state is unchanged?

If my updateState function doesn’t change the state, will the trigger rule still fire? Or asked differently, can I write a trigger that updates the ACS, but only fires on the heartbeat timer?

1 Like

Your trigger rule will fire regardless of whether you change the state. If you look at the examples they all simply use () as the state so if the rule only fired if the state changed, it would never fire here.

In general, a trigger should be written such that the rule can be fired at arbitrary points and it will do the right thing. With heartbeats your trigger will at least fire at those intervals but it can fire a lot more often in between.

2 Likes