#Can I make the Home Assistant sound more natural?

1 messages · Page 1 of 1 (latest)

gaunt basin
#

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;)).

#

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?

soft tangle
#

Hmm. This is a good point. Perhaps the agent should translate some of the response in some cases.

fast linden
#

The en-US and en-GB models respond with "minus one point four degrees F" 😁

muted sorrel
#

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?

muted sorrel
tranquil sand
#

Yes, this is polish language 🙂 I'll try to see it today/tomorrow 😀

gaunt basin
gaunt basin
gaunt basin
tranquil sand
#

@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.

gaunt basin
#

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

gaunt basin
gaunt basin
tranquil sand
#

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?

gaunt basin
gaunt basin
#

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

gaunt basin
#

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;)

gaunt basin
tranquil sand
#

your sentence didn't match anything

gaunt basin
#

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 😄

tranquil sand
#

I can add extra sentence for weather, but the I will return only temperature 😉

gaunt basin
#

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 😄

gaunt basin
tranquil sand
#

The only problem with this sentence is that the temperature must be returned from the entity weather and not from the temperature entity.

gaunt basin
#

oh...

tranquil sand
#

If you need ask about your sensor, then you need prepare your custom sentence

gaunt basin
#

this?

tranquil sand
#

yep

gaunt basin
#

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

tranquil sand
#

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

gaunt basin
#

I mean you can choose which one gets exposed

gaunt basin
tranquil sand
#

I can prepare more sentences for asking more details 😉

gaunt basin
#

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)

jovial forge
gaunt basin
jovial forge
tranquil sand
jovial forge
# tranquil sand 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.

soft tangle
gaunt basin
#

With a VPN like Tailscale it’s really easy

jovial forge
tranquil sand
#

@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"
gaunt basin
jovial forge
# gaunt basin Polish has a pretty good success rate, and I am running a (pretty old) GPU in my...

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.

tranquil sand
#

@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 😁

gaunt basin
#

Do you think rain/snow questions would be useful?

jovial forge
gaunt basin
tranquil sand
#

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? 🙂

gaunt basin
jovial forge
tranquil sand
#

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

jovial forge
#

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.

tranquil sand
#

yep.. good point 😉

gaunt basin
tranquil sand
tranquil sand
jovial forge
tranquil sand
#

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
jovial forge
tranquil sand
#

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 %}
#

I think that I will also update the main answer of weather to include more weather details..

jovial forge
# tranquil sand BTW. I removed question about air quality - this param don't exist in weather en...

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('') }}
tranquil sand
#

Very good idea for the wind, maybe you have an other idea for a better answer about the current weather? 😅

jovial forge
#

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.

jovial forge
tranquil sand
jovial forge
tranquil sand
#

I'll use your example with detailed weather 😅

tranquil sand
#

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."
jovial forge
#

Wow, there are so many vowels in Polish 🙂

gaunt basin
tranquil sand
tranquil sand
#

@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

gaunt basin
tranquil sand
#

no, in polish language, a comma is correct, not a dot.

tranquil sand
#

@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

gaunt basin
gaunt basin
tranquil sand
jovial forge
tranquil sand
gaunt basin
#

<timer> and <timer_set> are expressions, I get that much, but what do they stand for?

jovial forge
gaunt basin
#

ok, so whisper correctly interprets me saying "timer" but the sentences here use "tajmer" (which is how you read it phonetically in Polish). Thanks.

jovial forge
#

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.

gaunt basin
#

"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 🙂

jovial forge
#

Home Assistant needs to convert the numbers. Are you already on the beta version?

gaunt basin
jovial forge
#

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
jovial forge
# gaunt basin For now I'm trying to understand how to trigger the stuff that already should wo...

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.

jovial forge
# gaunt basin does this look ok?

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.

jovial forge
gaunt basin
gaunt basin
jovial forge
gaunt basin
#

I'm on HAOS too, but with the advanced SSH addon (with protected mode turned off) you can do a lot to it

jovial forge
#

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?

gaunt basin
#

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 😉

jovial forge
#

You see, it’s hard to mess up 🙂 And everyone is helpful.

gaunt basin
gaunt basin
jovial forge
#

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 🙂

gaunt basin
#

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

jovial forge
#

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.

gaunt basin
#

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

jovial forge
#

The problem is that "zatrzymaj minutnik" is included under Cancel, so it cannot be Pause.

gaunt basin
#

but that wasn't added by me 🙂

#

how did that pass before?

jovial forge
#

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.

gaunt basin
#

Pretty much the same here

#

what I'm saying is that was already there

#

I did not add it

#

no wait

#

nevermind

jovial forge
#

But you wrote it under cancel, and the test is in pause!

gaunt basin
#

yeah

#

that's why I said never mind 😄

#

I though I added the other one 😄

#

I hope this one works, and I'm out\

jovial forge
#

zatrzymaj minutnik -> Stop the timer.
This shouldn’t be Pause, let it remain Cancel.

gaunt basin
#

I think it is fine now?

jovial forge
#

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.

gaunt basin
#

How can I run these tests? Is there some container I can use?

jovial forge
#

In Hungarian, it indeed means stopping rather than pausing; most likely, <timer_stop> is a bit misleading in this case.

gaunt basin
#

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

jovial forge
#

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.

jovial forge
gaunt basin
jovial forge
#

But this only works on a forked repo 🙂

gaunt basin
#

I have forked it and initialized codespace, how do I run tests in it?

jovial forge
#

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/

gaunt basin
#

I always forget to read the readme

jovial forge
#

This works on your own machine too if it’s more convenient, though on Windows, you’ll need WSL 🙂

gaunt basin
#

I'm using a Mac, so python shouldn't be a problem 😉

#

it's ok now 🙂

jovial forge
#

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.

gaunt basin
gaunt basin
#

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)

jovial forge
# gaunt basin Anyway I've closed the first PR and opened the new one (which I've tested before...

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.

gaunt basin
jovial forge
#

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.

gaunt basin
#

Yeah, I knew that. Followed by pip to install stuff in it

gaunt basin
jovial forge
#

I don’t really know what else the setup does either 🙂 I’m a super Windows person 😄 Exchange/Windows Server/Azure

gaunt basin
jovial forge
#

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...

gaunt basin
jovial forge
#

That way, I can sort of understand, but I’m more of an installer/troubleshooter.

gaunt basin
jovial forge
gaunt basin
tranquil sand
#

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”.

gaunt basin
gaunt basin
tranquil sand
#

you have a alias with name "Temperatura na zewnątrz"

#

remove it and try again

#

This sensor yous this name "sensor.outdoor_temperature"

gaunt basin
tranquil sand
gaunt basin
tranquil sand
#

we just return {{ state.state_with_unit }}

gaunt basin
#

it works fine without the alias

tranquil sand
#

you should convert your sensor to custom weather template - then it will work by default for you

gaunt basin
#

but if I want to ask about some room temperature it will still return the answer in a wrong way

gaunt basin
tranquil sand
#

so now is should works for you

gaunt basin
#

but it still won't work for my room, water heater, etc. tempearutes

tranquil sand
#

{{ 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.

gaunt basin
#

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

tranquil sand
#

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 😉

tranquil sand
#

I did some test for my intent and it works correct.. but it only works because the correct intent is used..

tranquil sand
#

@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