I think there is a well-established way to have a trigger pick up when the state of entity A changes, including cleanly handling if entity A is temporarily unavailable or a restart of HA causes it to be so, (e.g., trigger when some state on entity A changes to value "foo", unless coming from an unavailable state) and then resulting in an action on entity B (e.g., call the "set config value X to value 'bar'" on entity B).
However, I do not think there is a well-established way to ensure the action occurs eventually on entity B if entity B is unavailable, or if some service call to entity B failed, etc. For example, say I want to ensure that a lightbulb turns on when the dishwasher stops. I can trigger on the state of the dishwasher changing to "stopped" and have the "turn on" service call target the lightbulb. But what if the lighbulb is unavailable during the trigger firing? Or put another way, let's say I want the lightbulb to be forced to be turned on, even if somebody comes along and turns the bulb off, or if the bulb is disconnected from the network and then reconnected later in an "off" state, until the dishwasher is no longer in the "stopped" state -- i.e., essentially have HA govern the direct linkage of the dishwasher's "stopped" state and the lightbulb's "on" state.
Is this kind of thing possible without significant custom automation involving polling-and-checking the lightbulb's state to see if it's still in the desired "on" state? Surely there is something more elegant and repeatable... or no?