Refactored assistant for HA support