My automations are good at thresholds and bad at context. Jev answers typed questions with a calibrated probability, for about two thousandths of a cent each. Here is how I wired it into Home Assistant with the old rules kept as a safety net, and what it really costs.
A Zigbee smart plug, nine automations, and one invisible pump that saves the house from flooding - the “invisible device” pattern, monitored with Home Assistant.