new automation state model, sort of working, but not really