Make Home Assistant API automations reliable by separating values from validity, staleness, recovery, and action authority in a three-state contract.