intents icon indicating copy to clipboard operation
intents copied to clipboard

[SV] intents for max/min light intensity

Open Robin-St opened this issue 2 years ago • 2 comments

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

Robin-St avatar Jan 07 '23 10:01 Robin-St

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.

larsdunemark avatar Jan 10 '23 21:01 larsdunemark

I think that is another problem than interpreting the intent.

Robin-St avatar Jan 10 '23 23:01 Robin-St

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

Robin-St avatar Jan 12 '23 19:01 Robin-St

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)

Robin-St avatar Jan 12 '23 19:01 Robin-St

Run script/setup in your dev container. The PIP dependencies are out of date.

tetele avatar Jan 12 '23 19:01 tetele

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

Robin-St avatar Jan 12 '23 20:01 Robin-St