Open witold-gren opened 2 months ago
The similar issue exist when we have response from HassTimerStatus.yaml
. We can use one params {{ next_timer.area }}
to return area name. But when we use some variations of name for our area like: name: "Kuchni[a]"
the this variable return configuration string, not correct area name. In my case:
language: pl
tests:
- sentences:
- "stan minutnika"
- "status minutnika"
- "podsumowanie minutnika"
- "jaki stan minutnika"
- "jaki jest stan minutnika"
- "stan moich minutników"
- "jaki jest stan moich minutników"
- "ile czasu pozostało na moich minutnikach"
intent:
name: HassTimerStatus
response: |
2 uruchomione minutniki. 1 wstrzymany minutnik. Pozostały 3 minuty na 5 minutowym minutniku w kuchni[a].
I see the answer:
2 uruchomione minutniki. 1 wstrzymany minutnik. Pozostały 3 minuty na 5 minutowym minutniku w kuchni[a].
but it should be:
2 uruchomione minutniki. 1 wstrzymany minutnik. Pozostały 3 minuty na 5 minutowym minutniku w kuchni.
@witold-gren I have written macro that parse area name and return first option for it, check it out here, I hope you will find it useful: https://github.com/home-assistant/intents/pull/2684 Area names in fixtures should be written in the way that first option returns nominative case and use that when checking. For example, return message is "No timers found in the area kitchen" ("Nema timera u prostoriji kuhinja" in Croatian).
I have very simple
_fixtures.yaml
configuration:When I run pytest for below test case configuration:
sentences
:test
:I see that all te time pytest can not discover timer on this area. When I print
{{ slots }}
in my response I see:{'area': 'kuchni', 'timers': [], 'date': datetime.date(2013, 9, 17), 'time': datetime.time(1, 2)}
Also when I check main params in top of run the test:
I observed that my timer use area call
area='kuchni[a]'
. This is incorrect because I can not use this name in my test templates.