I'm using voice assistant with Home Assitant conversation agent. It generally undestands me well (as long as I know what to ask and use the right device names or aliases I've set), but the responses are very rough. For example when I as k it what's the temperature outside it'll answer something like "Temperatura na zewnątrz jest -1.4 °C" (Temperature outside is -1.4 °C) pretty rough already, but that's not the problem. Piper will read -1.4 °C as "one four degrees C". It skips the minus sign, reads it as two numbers, (correctly) reads ° as degrees and then says letter C instead of celsius (it would be just fine if it just said degrees, we're only using units that make sense anyway;)).
#Can I make the Home Assistant sound more natural?
1 messages · Page 1 of 1 (latest)
I think the intent is ok, as it understands my query and responds with the right data. Piper is also reading the text as-is. I guess the problem is the conversation agent?
Hmm. This is a good point. Perhaps the agent should translate some of the response in some cases.
The en-US and en-GB models respond with "minus one point four degrees F" 😁
Yeah, it's a known issue which was fixed monkey patched in some languages which use the comma as a decimal separator instead of a point. What language is that? Latvian?
Oops, Google Translate says it's Polish, which was my initial thought, but the "ą" threw me off 😅 @arctic bramble @tranquil sand can you guys look into porting this PR to Polish? https://github.com/home-assistant/intents/pull/1706
Yes, this is polish language 🙂 I'll try to see it today/tomorrow 😀
Big difference - there's minus and point
sorry, I was sure I said it was Polish
I think it would also be lot more natural to use "wynosi" instead of "jest" for this
@gaunt basin I prepared small update. You can find it here https://github.com/home-assistant/intents/pull/2624 . But I still need your help. As you can see, I'm not using the word jest but wynosi, and it means that your installation is using a different intent to check the temperature. Write your sentence in the Developer tools -> ASSIST and check your answer. The intent name should be HassGetWeather or HassClimateGetTemperature . In my opinion, you have a different name of intention.
I was trying this. The output I got was technically correct,but was read as-is with Piper.
The main issue is the interpretation of output sentence
is there any way I can test this PR without just manually replacing files?
I think this is much more important. And missing the minus sign makes a pretty big difference too 😉
HassGetState is a different intent. In this case, we are not asking about the temperature but about a specific value of an entity. Therefore, in this case, piper will unfortunately still not read this value correctly - even when I added a correction to my previous PR. Maybe @proud ore will be able to help us with this problem?
I know with intents I'm kind of supposed to know how to ask question, but this sentence seems natural to me.
I realised I have an entity with name "temperatura na zewnątrz" that I'm not using anymore. I've removed it to avoid confusion.
It matched some weird intent now
I guess I have to have a thermometer entity in area "Na zewnątrz" for this to work?
I know it does with "temperatura na zewnątrz" added to an entity as the voice assistant label/name, but still with the HassGetState intent
I would like HA to use data from my weather station for this, but unfortuately some of its sensors are inside, so I can't move it to "na zewnątrz" (outside) area
To make things more complicated this is the right way to ask it here 😄
also "na dworze" (or the one that's technically incorrect?) "na dworzu" to make things more complicated;)
also when there's a decimal it is always (I think) "stopnia". 1.5 stopnia, 99.8 stopnia, etc.
I know it didn't
I'm just saying these are a few more ways to ask this question naturally 😉
I don't know how this should really be done 😄
I can add extra sentence for weather, but the I will return only temperature 😉
I understand the basics, but I'm only getting started with this. I have no idea how it should work.
And I'm not great at RegExes 😄
why only temperature? Other things like humidity, air pressure, etc. wouldn't work with that?
The only problem with this sentence is that the temperature must be returned from the entity weather and not from the temperature entity.
oh...
If you need ask about your sensor, then you need prepare your custom sentence
this?
yep
My weather station (ecowitt) only supports sensor and binary_sensor entities. is there a way to create a template putting them together into a weather entity? Temperatures can differe quite a bit between a forecast and actual data collected outside
it provides a lot of good actual data
please check this configuration, you can create custom weather entity, and you can set your own sensor 🙂
However, I don't really know how the voice assistant will behave if we have 2 weather entities
I can just disable it for assist.
I mean you can choose which one gets exposed
thanks a lot for this, that should work, somehow I missed there was a template for weather entity
I can prepare more sentences for asking more details 😉
great, let me know when you do - maybe I'll learn something 😉
I have dabbled with translating apps, I think I could contribute something down the road. Using Ollama as conversation agent has been useless so far for me, so the simple intent system will have to do for now (which is probably not a short timeframe)
Try the GPt-4o-mini in Hungarian; it works quite effectively. Just make sure to carefully select what you pass through to Assist in the expose list, so there’s less chance of errors. The price of GPT-4o-mini has become pretty reasonable for me. My bill is well under half a dollar per month, even with hundreds of requests.
I have no desire to pay for that. I might run something locally if I can, since I’m running a server with an RTX2070
I also ran it locally for a while, but then our government doubled the electricity prices, so I moved certain functions (STT/AI) to the cloud. The TTS stayed local, although I’m already considering moving that too because I really like the new Microsoft multi-language model. 🙂 I spent weeks looking for a machine that consumes 8-9W in standby and still isn’t slow.
check Nvidia Jetson AGX Orin 64gb developer kit 😉 I have it 😉
I’ve looked at such options too 🙂 But they come with a price—€3,000 VAT and customs. To make it even more complicated, I’m responsible for 4 HAs (two apartments, an office, and my parents' home), so I’d need four of them right away 🙂
Besides, I’m a Microsoft partner with my company, so I get $100/month Azure credit, which I might as well use. Although my HomeAssistant resource group costs don’t exceed $2, and that includes the STT/AI costs for all four HomeAssistant instances and the TTS costs for three of them.
Wow. That’s 2 grand. How well does it perform? STT and local AI models work alright?
Why? You could have one serve them all.
With a VPN like Tailscale it’s really easy
You're right, I didn't think about the VPN, but this solution would still be the equivalent of 1500 months' worth of costs. And even in the large-v3 model, Whisper isn't perfect in Hungarian.
@gaunt basin I will be OK? Or you have more sentences to ask?
- sentences:
- "Jaka jest temperatura na zewnątrz?"
- "Temperatura na zewnątrz?"
- "Temperatura na dworze?"
- "Temperatura na polu?"
- "Temperatura na placu?"
- "Ile jest stopni na zewnątrz?"
- "Ile jest stopni na polu?"
- "Ile jest stopni na dworze?"
intent:
name: HassGetWeather
response: "8 stopni celsjusza"
Polish has a pretty good success rate, and I am running a (pretty old) GPU in my server for other reasons anyway.
That sounds really good 🙂
Unfortunately, Hungarian performs so poorly with Whisper that the built-in assistant is unusable 😦 The LLM can figure out what you mean, but the built-in assistant, of course, requires strict matching. Plus, for the Large model, you really need a serious card or this devkit 🙂
If you’re already running something like this, it’s a perfect solution—especially if Polish happens to be a luckier language.
I’m continuously testing it because I’m translating the Hungarian intents myself, and to prepare the built-in intents, I need to know what I’m up against.
But the level of convenience Azure STT and GPT-4o-mini provide is something I’m not willing to give up, I think. Moreover, as I mentioned, the multi-language TTS has been added to my list since September, as it can handle English and Serbian text without any issues.
@gaunt basin I prepared several sentences for support more sensor in weather, check if there's anything else I can add. Now I will try to prepare for it the correct intents sentences.
And of course correct answers 😁
Do you think rain/snow questions would be useful?
Hmm, can such weather data be retrieved in intents? (humidity, cloud cover, wind gusts)?
These are simply states or attributes of a sensor, why would that be too hard to collect?
take a look at how they respond to the weather..
{% set temperature = state.attributes.get('temperature') %}
...
{{ weather_condition.get((state.state | string).lower(), "") }}
I think I can replace the temperature with anything else..
I didn't say it would be difficult, but just to check if it's possible to ask about an entity differently in our language? 🙂
Nothing else comes to my mind now
I don't think this is handled in the engine, it's not available in any language. I would first try it locally before diving into the repo. I'll test it right away 🙂
It should works if we add extra attributes to weather entity:
- name: "Pozna(ń|nia|niu)"
id: "weather.poznan"
state: "rainy"
attributes:
temperature: "8"
temperature_unit: "°C"
dew_point: 6
humidity: 85
cloud_coverage: 95
pressure: 1018
etc.
similar like I have it in my HA
It works live, I tested it 🙂
Alright, I'll translate it too 🙂
I might just settle for asking it to give a detailed weather report and check a few weather apps to see how many common attributes they have. That way, I can avoid errors if one of them doesn't have a particular attribute.
yep.. good point 😉
This has been merged, does it mean it will land in the next core release?
you may find it useful @jovial forge
yes, in the next official release
Make sure to handle cases where such an attribute doesn’t exist, so it doesn’t throw an error! For example, my weather service provider doesn’t provide values for ozone or cloud_coverage.
Thank you very much, I’ve saved it. 🙂
BTW. I removed question about air quality - this param don't exist in weather entity.
but I added question about index UV 😎
# Indeks UV
- sentences:
- "Jaki jest obecny indeks UV?"
- "Jaki jest dzisiaj poziom indeksu UV?"
- "Jaki jest indeks UV?"
- "Jaki jest indeks UV w tej chwili?"
- "Ile wynosi indeks UV?"
- "Jaki jest poziom indeksu UV?"
- "Jaki jest poziom indeksu UV w tej chwili?"
- "Czy indeks UV jest wysoki?"
intent:
name: HassGetWeather
response: "Index UV wynosi 0"
my entity for the test:
- name: "Wrocław[iu]"
id: "weather.wroclaw"
state: "cloudy"
attributes:
temperature: "21"
temperature_unit: "°C"
humidity: 85
dew_point: 6
pressure: 1018
pressure_unit: hPa
wind_gust_speed: 24.3
wind_speed: 14.1
wind_speed_unit: km/h
ozon: 62.8
cloud_coverage: 95
visibility: 24.1
visibility_unit: km
uv_index: 0
It's not necessarily required to remove it; just handle it so that if it's unavailable, it says the data is not available.
In my case, there’s no UV data either 😦 I fetch that separately along with air pollution data.
yep, in all response I have a condition, somethins like this:
uv_index: >
{% set uv_index = state.attributes.get('uv_index') %}
{% if uv_index != "" %}
Index UV wynosi {{ uv_index }}
{% else %}
Niestety nie mogę podać wartości indexu UV
{% endif %}
This is file with all responses 😀
I think that I will also update the main answer of weather to include more weather details..
Well, I came up with something like this 🙂
The wind speed is 4.3 km/h, coming from the NE direction, with gusts reaching 9.0 km/h.
{% set wind_bearing = state.attributes.get('wind_bearing') %}
{% set wind_gust_speed = state.attributes.get('wind_gust_speed') %}
{% set wind_speed = state.attributes.get('wind_speed') %}
{% set wind_speed_unit = state.attributes.get('wind_speed_unit') %}
{% set wind_bearing_text = '' %}
{% if wind_bearing != None %}
{% if 0 <= wind_bearing < 90 %}
{% set wind_bearing_text = 'NE' %}
{% elif 90 <= wind_bearing < 180 %}
{% set wind_bearing_text = 'SE' %}
{% elif 180 <= wind_bearing < 270 %}
{% set wind_bearing_text = 'SW' %}
{% elif 270 <= wind_bearing <= 360 %}
{% set wind_bearing_text = 'NW' %}
{% else %}
{% set wind_bearing_text = 'unknown direction' %}
{% endif %}
{% endif %}
{% set wind_report = [] %}
{% if wind_speed != None %}
{% set wind_report = wind_report + ['The wind speed is ' ~ wind_speed | string | replace(',', '.') ~ ' ' ~ (wind_speed_unit if wind_speed_unit != None else 'km/h')] %}
{% endif %}
{% if wind_bearing_text %}
{% set wind_report = wind_report + [', with a direction of ' ~ wind_bearing_text] %}
{% endif %}
{% if wind_gust_speed != None %}
{% set wind_report = wind_report + [', the gust speed is: ' ~ wind_gust_speed | string | replace(',', '.') ~ ' ' ~ (wind_speed_unit if wind_speed_unit != None else 'km/h')] %}
{% endif %}
{{ wind_report | join('') }}
Very good idea for the wind, maybe you have an other idea for a better answer about the current weather? 😅
Well, I’ll have a basic template for checking the weather outside,
there will be one for requesting detailed weather information, including temperature, humidity, precipitation, cloud cover, wind, pressure, and UV index.
Then there will be a detailed wind report,
and maybe UV will be a separate section as well.
So far, I’ve been testing how it works when a value is missing 😛 I’ve struggled a lot to ensure there’s always a weather report, even if one of the values is missing.
Here’s the end, machine-translated text!
@gaunt basin please check my PR https://github.com/home-assistant/intents/pull/2632 now we support more entity for weather 🙌
GitHub
Added by default support for:
temperature
humidity
dew point
pressure
wind speed
ozone
cloud coverage
visibility
uv index
you're so quick 🙂 I just finished writing the responses 
I'll use your example with detailed weather 😅
It is really cool 🙂 thanks @jovial forge
# Pogoda szczegółowa
- sentences:
- "Podaj mi szczegółową pogodę"
- "Podaj mi pogodę w szczegółach"
- "Jaka jest pogoda w szczegółach?"
- "Jaką mamy pogodę w detalach?"
- "Jaka jest dzisiaj pogoda w detalach?"
- "Jaka jest teraz pogoda w detalach?"
- "Jakie są dzisiaj warunki pogodowe w detalach?"
- "Jakie są warunki pogodowe w detalach?"
- "Opisz mi w szczegółach warunki pogodowe"
- "Opisz mi w detalach dzisiejszą pogodę"
intent:
name: HassGetWeather
response: "Obecna temperatura wynosi 21 stopni celsjusza i jest pochmurnie, wilgotność to 85 procent natomiast ciśnienie atmosferyczne jest na poziomie 1018 hektopaskali, prędkość wiatru wynosi 14,1 kilometrów na godzinę, jest umiarkowany wiatr, jednak w porywach może wynieść nawet 24,3 kilometrów na godzinę. Zachmurzenie osiąga 95 procent a aktualny indeks UV jest niski i wynosi 0."
Well, thank you for the idea too 🙂 I never would have thought of it myself.
Wow, there are so many vowels in Polish 🙂
Looks awesome! Did you add the plural for for the fractions? 1.5 stopnia, etc.?
No, I didn't. If you give me a rule on how to recognize the appropriate variety, I can add something like that 😉
@gaunt basin is this correct?
0 stopni Celsjusza
0,1 stopnia Celsjusza
0,2 stopnia Celsjusza
0,3 stopnia Celsjusza
0,4 stopnia Celsjusza
0,5 stopnia Celsjusza
0,6 stopnia Celsjusza
0,7 stopnia Celsjusza
0,8 stopnia Celsjusza
0,9 stopnia Celsjusza
1 – 1 stopień Celsjusza
1,1 stopnia Celsjusza
1,2 stopnia Celsjusza
1,3 stopnia Celsjusza
1,4 stopnia Celsjusza
1,5 stopnia Celsjusza
1,6 stopnia Celsjusza
1,7 stopnia Celsjusza
1,8 stopnia Celsjusza
1,9 stopnia Celsjusza
2 stopnie Celsjusza
2,1 stopnia Celsjusza
2,2 stopnia Celsjusza
2,3 stopnia Celsjusza
2,4 stopnia Celsjusza
2,5 stopnia Celsjusza
2,6 stopnia Celsjusza
2,7 stopnia Celsjusza
2,8 stopnia Celsjusza
2,9 stopnia Celsjusza
3 stopnie Celsjusza
3,1 stopnia Celsjusza
3,2 stopnia Celsjusza
3,3 stopnia Celsjusza
3,4 stopnia Celsjusza
3,5 stopnia Celsjusza
3,6 stopnia Celsjusza
3,7 stopnia Celsjusza
3,8 stopnia Celsjusza
3,9 stopnia Celsjusza
4 stopnie Celsjusza
4,1 stopnia Celsjusza
4,2 stopnia Celsjusza
4,3 stopnia Celsjusza
4,4 stopnia Celsjusza
4,5 stopnia Celsjusza
4,6 stopnia Celsjusza
4,7 stopnia Celsjusza
4,8 stopnia Celsjusza
4,9 stopnia Celsjusza
5 stopni Celsjusza
I think that's good. all the fractions have the same plural I think - doesn't matter if it's 0.1 or 1999.1 😉 Shouldn't we use dots instead of a comma though?
@gaunt basin my last commits also fix this issue, I you have access please review my PR and accept it (the beta version is released on this Wednesday)
unfortunately, the test failed because there is an error in GitHub Action pipeline..but in my local machine everytging works properly
I'm sorry, but while I usually have nothing against beta testing, I won't upgrade my Home to HA beta;)
I get confused with different formatting in different languages 🙂 All I know is that american calendar formatting is bad, illogical, and no one should use it 😄
I don't encourage you to install the Beta version, I just want to say that it would be nice if this change was already available 🙂
This is the new word variation counter module where your PR failed, don't worry 🙂 The tests ran successfully.
I know about it, I hope it will be fixed soon
I wanted to set a timer using VA. I've tried "Ustaw timer na jedną minutę." Didn't work. Looked at https://github.com/home-assistant/intents/blob/main/sentences/pl/homeassistant_HassStartTimer.yaml. Still have no idea how to say it 😄
<timer> and <timer_set> are expressions, I get that much, but what do they stand for?
ok, so whisper correctly interprets me saying "timer" but the sentences here use "tajmer" (which is how you read it phonetically in Polish). Thanks.
This sucks 😮 In Hungarian, I can’t get the STT to interpret English text... I have to rewrite things phonetically. But for you, it works just fine. This can be easily fixed and included in the next release.
Until then, you can add it to the custom_sentences folder.
"Ustaw zegar na jedną minutę" doesn't work either (jedną - one), is it because whisper doesn't turn it into a number?
When I say "Ustaw zegar na 10 minut." it works. Maybe because it's a number now 🙂
Home Assistant needs to convert the numbers. Are you already on the beta version?
nope, not going to 😉
For now I'm trying to understand how to trigger the stuff that already should work, understand how it does (or doesn't) and why 😉
In the new version, it will work 🙂
Q:Ustaw zegar na jedną minutę
intent:
name: HassStartTimer
slots:
minutes: jedną
details:
minutes:
name: minutes
value: 1
text: jedną
targets: {}
match: true
sentence_template: '[<timer_set> ]<timer> [trwający |na ]<timer_duration>'
unmatched_slots: {}
source: builtin
Keep testing and report any issues; that’s how the intents can improve 🙂
There are many changes in the new version—it’s much faster, for example.
If you have a backup of your system, you can try the BETA version too, and just roll back if needed 🙂
You can access the updates by clicking on the three dots, and during the BETA week, you can see changes earlier. If BETA isn’t active, the system will stay on the normal channel.
does this look ok?
What is an effective and safe way to test this stuff locally?
The test files related to it also need to be completed for the PR to pass the language lead review 🙂
Unfortunately, I don’t understand a word of Polish to know if it’s good or not 🙂 but the syntax is fine.
The testing method is to clone the repo or download it as a whole:
then copy the content of sentences/pl and responses/pl into the
/config/custom_sentences/pl/sentences/ and /config/custom_sentences/pl/responses/ folders.
Yeah, just got a comment to amend the tests, trying it now 🙂
Next time I'll probably clone my fork on HA config folder and symlink the changed parts there 🙂
I'm on HAOS, where it's a bit limited, so I wrote a script for it that downloads this: https://github.com/home-assistant/intents/archive/refs/heads/main.zip, extracts it, and copies it to the right place 🙂
I'm on HAOS too, but with the advanced SSH addon (with protected mode turned off) you can do a lot to it
I know, yeah, but this way it’s super convenient. I prefer staying within Docker. The script does its job and works perfectly 🙂
The test ran into an error:
FAILED tests/test_language_sentences.py::test_homeassistant_HassPauseTimer[pl] - AssertionError: For 'zatrzymaj minutnik' expected intent HassPauseTimer, got HassCancelTimer
assert 'HassCancelTimer' == 'HassPauseTimer'
This error means that during the test, for a given input (in this case, "zatrzymaj minutnik"), the system identified the HassCancelTimer intent instead of the expected HassPauseTimer intent.
Could it be that you wrote it in the wrong place?
Just fixed and pushed it
didn't notice the stop timer thing and put it in the paused one instead
I understand the idea of the whole thing, just need to get acquainted wit different places in the whole thing. I'm no developer, so I may be thinking differently 😉
You see, it’s hard to mess up 🙂 And everyone is helpful.
Yup, thanks a lot 🙂
so you have to mess up both tests and intents in the same way, which is hard to do unintentionally 😉
Exactly! That’s why you need to write tests for everything, because this way problems surface. Oh, and if you copy the repo, you’ll also get a cool weather report 🙂
Ok, it failed the 2nd time, and now I don't get why. "zatrzymaj" is "stop" and it's all in the right place
FAILED tests/test_language_sentences.py::test_homeassistant_HassPauseTimer[pl] - AssertionError: For 'zatrzymaj minutnik' expected intent HassPauseTimer, got HassCancelTimer
and I've added "zakończ" (which means "end") so I don't know what is going on there
"zatrzymaj" was already there
Well, I don’t like working live either; I usually test things on my own machine.
And the linter always finds mistakes in it. 😄 I don’t understand how I end up with so many unnecessary spaces...
Though, for small modifications like this, what you’re doing is probably the more convenient way.
I can already see a LOT of synonyms that would be natural for some intents. Once I get to understand it better I'll probably try to add some. So that people won't have to think as much how to word what they're trying to say
The problem is that "zatrzymaj minutnik" is included under Cancel, so it cannot be Pause.
Okay, not you, but it's already there 🙂 If I understand correctly, it means "stop/cancel."
You are only allowed to pause here. Stopping is already taken by stop/cancel.
In Hungarian, stopping also means canceling.
Pretty much the same here
what I'm saying is that was already there
I did not add it
no wait
nevermind
But you wrote it under cancel, and the test is in pause!
yeah
that's why I said never mind 😄
I though I added the other one 😄
I hope this one works, and I'm out\
zatrzymaj minutnik -> Stop the timer.
This shouldn’t be Pause, let it remain Cancel.
I think it is fine now?
timer_pause is <timer_stop>: "(zatrzymaj|zastopuj|uśpij|wstrzymaj)"
timer_cancel is <timer_cancel>: "(wyłącz|anuluj|przerwij|zakończ|zatrzymaj)"
And you added "zatrzymaj" to cancel again, which causes a conflict.
How can I run these tests? Is there some container I can use?
In Hungarian, it indeed means stopping rather than pausing; most likely, <timer_stop> is a bit misleading in this case.
it could be used both ways tbh, but you can't have it both ways here
I'm going to cancel the whole PR, and redo just the "timer" thing
You fork it for yourself, and the codespace works too.
Or you fork it and git it to your machine, then create a venv environment there.
I think it’s enough to simply remove "zatrzymaj" from pause and its test.
codespace? do you mean vscode workspace?
this:
But this only works on a forked repo 🙂
I have forked it and initialized codespace, how do I run tests in it?
Here, you can use the lint and test commands found in the script directory.
For example, the pytest tests --language pl command also works.
The list of commands can be found here:
https://github.com/home-assistant/intents/
This works on your own machine too if it’s more convenient, though on Windows, you’ll need WSL 🙂
I'm using a Mac, so python shouldn't be a problem 😉
it's ok now 🙂
Python works on Windows too, thank goodness, but I just can’t run this test without WSL 😄
I’m glad it works for you though.
THat was in devcontainer
on macOS it is installed OOB
ok, I've set up the venv, so I can run the tests locally now
Anyway I've closed the first PR and opened the new one (which I've tested before submitting)
Alright, then there won’t be an issue 🙂
One more piece of advice: if you add something "strange," like an English word in Polish, you can explain beforehand that you’re adding it because Whisper recognizes it that way.
And if you’re running it locally, make sure that if there are significant changes in the code, you’ll need to set up the venv again. That means it’s a good idea to sync the repo and set it up again before making modifications.
you mean to sync it back from upstream, and do pip install -r requirements.txt on my existing venv before running tests?
I meant this for the future 😉 It’s fine as it is now.
By the way, the /script/setup does everything. And you can enter the created environment with:
source venv/bin/activate
This way, you can precisely match the dependencies that will be used later.
So, if you want to add something else in 1-2 weeks, don’t forget to update your own repo and create a new venv.
Yeah, I knew that. Followed by pip to install stuff in it
New one? Isn't it enough to just source it and run pip install -r requirements.txt again?
Honestly, I don’t know 😛 I’ve messed up so many times by not updating that I always do it this way. Maybe it’s enough, though.
I don’t really know what else the setup does either 🙂 I’m a super Windows person 😄 Exchange/Windows Server/Azure
I'm a ConfigMgr admin working on a Mac so... 😉
Well, that’s what makes the world beautiful—everyone has their own fetish 🙂
I get a nervous breakdown from Macs, let alone supporting MS programs on them 😄
Though I’m starting to switch completely to PowerShell, which is available on Mac too, but...
I've been using them for years, and always enjoyed that. Sure I have to log in to my AVD to do some stuff on the ConfigMgr console, but it usually is more about planning than doing much work in it 😉
That way, I can sort of understand, but I’m more of an installer/troubleshooter.
I wouldn’t call it a fetish - I like using a Mac for what I can, Linux for what it is good at (servers/virtualization/containers/open source appliances), and Windows for what I have to (work/gaming).
This referred to administering MS products on a Mac 🙂 But don't take it as an offense.
It got approved yesterday;)
tried it in 2024.12.1, sentence "Temperatura na zewnątrz jest 0.9 °C" is read "Temperatura na zewnątrz jest zero dziewięć stopień C"
I see that still you HA configuration not use proper Hasill Intent. Word “jest” is use only when you ask about specific entity. Please check your sentence in Developer Tool in assist card and share on this thread.
Also 0.9 is wrong value for polish voice - it should be 0,9.
In all weather responses I converted this value to polish location.
I'm guessing you have an entity or alias called “temperatura”.
Please check this document to properly expose and name your devices 😉 https://www.home-assistant.io/voice_control/best_practices/
I've given one of my entities (and outdoor thermomether in a weather station) an alias "Temperatura na zewnątrz"
Jaka jest temperatura na zewnątrz
✅
Język: polski (pl)
intent:
name: HassGetState
slots:
name: temperatura na zewnątrz
details:
name:
name: name
value: Temperatura na zewnątrz
text: temperatura na zewnątrz
targets:
sensor.outdoor_temperature:
matched: true
match: true
sentence_template: jak(i|a|ie) (jest|są) <name> [<area>]
unmatched_slots: {}
source: builtin
you have a alias with name "Temperatura na zewnątrz"
remove it and try again
This sensor yous this name "sensor.outdoor_temperature"
Fine, but this should work for all temperature sensors, or entities with device class temperature
"should" but intent alone does not do it. All we do in intent is to return a value without the possibility of interfering with what's inside. https://github.com/home-assistant/intents/blob/main/responses/pl/HassGetState.yaml#L16
we just return {{ state.state_with_unit }}
it works fine without the alias
you should convert your sensor to custom weather template - then it will work by default for you
but if I want to ask about some room temperature it will still return the answer in a wrong way
Oh I already did
so now is should works for you
but it still won't work for my room, water heater, etc. tempearutes
{{ state.state_with_unit }} Unfortunately, I don't really know what to do with it. I will ask on another internal channel if it is possible to convert it automatically somehow.
Don't take it as a complaint, you're doing a great job and I'd like to contribute more than one word too 😉
There has to be a way, I'd like to understand it and make it work
remember that you can always create your own intention with your own answer 😎 then you have a lot of control over something like this.
Unfortunately, it is not possible to quickly and easily create one engine that will support all unusual things for each language.
I have already reported several errors, but fixing them is either specific to Poland or it is something that is not easy 😉
I did some test for my intent and it works correct.. but it only works because the correct intent is used..
@gaunt basin other people propose to use this convention: {{ is_number(state.state) | iif(state.state | replace(".", ",") + " " + state.attributes.unit_of_measurement, state.state_with_unit) }} to transform value with dot to comma. However, this will not solve the problem of negative numbers (eg. -13,4) and units (eg. °C).. if you can test it create file custom_sentences/pl/HassGetState.yaml (https://www.home-assistant.io/voice_control/custom_sentences_yaml/#setting-up-sentences-in-the-config-directory) with content:
language: pl
responses:
intents:
HassGetState:
one: |
{% set vowelsList = ['e', 'i', 'o', 'u'] %}
{% set lastChar = slots.name | last %}
{{ slots.name | capitalize }} wynosi
{% if state.state_with_unit == 'open': %}
{% if lastChar == "a" %}otwarta{% elif lastChar in vowelsList %}otwarte{% else %}otwarty{% endif %}
{% elif state.state_with_unit == 'close': %}
{% if lastChar == "a" %}zamknięta{% elif lastChar in vowelsList %}zamknięte{% else %}zamknięty{% endif %}
{% elif state.state_with_unit == 'on': %}
{% if lastChar == "a" %}włączona{% elif lastChar in vowelsList %}włączone{% else %}włączony{% endif %}
{% elif state.state_with_unit == 'off': %}
{% if lastChar == "a" %}wyłączona{% elif lastChar in vowelsList %}wyłączone{% else %}wyłączony{% endif %}
{% else %}
{{ is_number(state.state) | iif(state.state | replace(".", ",") + " " + state.attributes.unit_of_measurement, state.state_with_unit) }}
{% endif %}
don't forgot reload DOMENA INTENT SCRIPT and DOMENA ROZMOWA in Reloading YAML configuration
BTW. I'm not sure if the word "wynosi" will be correct for every intention.. but you can test it