From dc7db75963e103eeb40b0c3ee857891d3594f62d Mon Sep 17 00:00:00 2001 From: smilerz Date: Tue, 6 Feb 2024 11:14:47 -0600 Subject: [PATCH] regex replace not run on food if there are no food aliases --- cookbook/helper/automation_helper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbook/helper/automation_helper.py b/cookbook/helper/automation_helper.py index a86d405b..fa333fb3 100644 --- a/cookbook/helper/automation_helper.py +++ b/cookbook/helper/automation_helper.py @@ -98,7 +98,7 @@ class AutomationEngine: try: return self.food_aliases[food.lower()] except KeyError: - return food + return self.apply_regex_replace_automation(food, Automation.FOOD_REPLACE) else: if automation := Automation.objects.filter(space=self.request.space, type=Automation.FOOD_ALIAS, param_1__iexact=food, disabled=False).order_by('order').first(): return automation.param_2