Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[de] HassLightSet with satellite area #2237

Open
joie96 opened this issue Jun 17, 2024 · 1 comment
Open

[de] HassLightSet with satellite area #2237

joie96 opened this issue Jun 17, 2024 · 1 comment
Labels

Comments

@joie96
Copy link

joie96 commented Jun 17, 2024

To set the brightness in the area of the activated satellite does not work.

I think it should be something like this:

language: de
intents:
  HassLightSet:
    data:
      # Change brightness of all lights in the same area as a satellite device
      - sentences:
          - "<setzen>[ <artikel>] Helligkeit[ auf] <brightness>"
          - "[<artikel> ]Helligkeit[ auf] <brightness>[ <setzen>]"
          - "dimme[ <artikel> Helligkeit][ (auf|zu)] <brightness>"
          - "[Helligkeit][ (auf|zu)] <brightness> dimmen"
        response: "brightness"
        requires_context:
          area:
            slot: true

But even when I'm using this in custom_sentences to extend the build in HassLightSet, this is conflicting with the current
- "[<setzen> ]<artikel> Helligkeit[ (<lichter>|<alle_lichter>)][ <area>][ auf] <brightness>[ ein]"
(https://github.com/home-assistant/intents/blob/main/sentences/de/light_HassLightSet.yaml#L15)

I think the above sentence needs to be changed, because without all optional parts it reduces to
- "Helligkeit <brightness>"
which I think does not make sense without

        requires_context:
          area:
            slot: true
@mitrokun
Copy link
Contributor

mitrokun commented Jun 30, 2024

for custom sentence, you need to create your own intent and script.

This example works:

language: de
intents:
  BrightnessSet:
    data:
      - sentences:
          - "Helligkeit <brightness>"
        requires_context:
          area:
            slot: true

BrightnessSet:
  action:
    service: light.turn_on
    data:
      brightness_pct: "{{brightness}}"
    target:
      area_id: "{{ area_id(area) }}"
  speech:
    text: "Ok"

It will most likely work with built-in intent, but someone needs to create a PR with new sentence
The function is quite specific, it can literally blind you if the device misunderstands you. I would leave it to the end user to choose whether to add it to himself or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants