intents
intents copied to clipboard
[SV] intents for max/min light intensity
First a minor refactor of moving synonyms to "dim" to commons.
Then an attempt to catch intents for maximum and minimum intensity for lights.
It passes all tests but i have not seen it done in any other language so i dont know if it is correct. I used slots to set brightness to 100 or 1 as in the following example:
- sentences:
- "dim <name> to max brightness"
slots:
brightness: 100
Setting a light to maximal seems simple but I'm not sure if 1% is suitable for minimum, feels like it can require more knowledge about the light or a different intent to handle this use case. It might be that a minimum for one light could be 10% to be visible and 20% for an other.
I think that is another problem than interpreting the intent.
I think it is time to give up on this PR soon, tests fails here and running the branch locally gives a lot of different error for domains not changed by this PR..
ERROR tests/test_language_sentences.py::test_climate_HassClimateSetTemperature[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_homeassistant_HassTurnOn[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_light_HassTurnOff[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_cover_HassCloseCover[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_fan_HassTurnOff[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_light_HassLightSet[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_light_HassTurnOn[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_climate_HassClimateGetTemperature[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_fan_HassTurnOn[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_homeassistant_HassTurnOff[sv] - ValueError: too many values to unpack (expected 2) ERROR tests/test_language_sentences.py::test_cover_HassOpenCover[sv] - ValueError: too many values to unpack (expected 2)
Run script/setup in your dev container. The PIP dependencies are out of date.
Run script/setup in your dev container. The PIP dependencies are out of date.
Thanks, that solved the weird errors, thou still gets some tests that suddenly fails. Probably something missed when keeping the branch up to date with main. Copied some of the edits to a fresh branch of main and submitted a new PR