* Split async_update * Use pytest parameters to avoid duplicate code * Fix UnboundLocalError * Test error rendering for template state Co-authored-by: Paulus Schoutsen <paulus@home-assistant.io>