Custom response for "turn on the lights"

Hi I have a custom sentence for voice in ~/custom_sentences/en/responses.yaml, if I say “turn on the bedroom lamp”, it responds with “ok”. If I say “turn on the lights” which HA knows is the bedroom area, it responds with, “turned on the lights”.

I would like it to say “ok” just as it does if one specifies an entity.

My responses.yaml file is like so:

language: "en"
responses:
  intents:
    HassTurnOn:
      default: "ok"
    HassTurnOff:
      default: "ok"

How do I change that response?

Ok these should be listed on the custom sentences documentation page.
For HassTurnOn

one can have the following:

default: "Turned on the light"
lights_area: "Turned on the lights"
lights_floor: "Turned on the lights"
light_all: "Turned on all of the lights"
fans_area: "Turned on the fans"
cover: "Opened"
cover_device_class: "Opened the {{ slots.device_class }}"
scene: "Activated"
script: "Started"
lock: "Locked"
valve: "Opened"

My responses.yaml file now looks like:

language: "en"
responses:
  intents:
    HassTurnOn:
      default: "ok"
      lights_area: "ok"
    HassTurnOff:
      default: "ok"
      lights_area: "ok"

It surprises me that more complete information like this is not included in the documentation.

Hi,

I definitely agree that the documentation is lack in terms of custom sentences. Especially with examples.

I didn’t know that you could update the existing sentences that way.

I had issues with faster whisper decoding my room names, especially the den. I used the following to fix that:

So for the light name for the den, I used the following:

Form my light voice control, I created the following in ~/custom_sentences/en/lightd.yaml

  lightname:
    values:
      - in: "(dead|den|din|dent|dim)"
        out: "light.den_light"
      - in: "living"
        out: "light.living_light"
      - in: "kitchen"
        out: "light.kitchen_light"
      - in: "half"
        out: "light.halfbath_light"

  lightOff:
    data:
      - sentences:
          - "turn off [the]{lightname} (light|lite)[?]"
          - "set [the] {lightname} light [to] 0 (percent|%)[?]"
          - "turn off [the] {lightname} light [to] 0 (percent|%)[?]"

  lightOn:
    data:
      - sentences:
          - "turn on [the]{lightname} (light|lite)[?]"
          - "turn on [the] master {lightname} (light|lite)[?]"

  lightOnControl:
    data:
      - sentences:
          - "set [the] {lightname} (light|lite) [to] {OneToHundred} (percent|%)[?]"[?]"
          - "turn on [the] {lightname} (light|lite) [to] {OneToHundred} (percent|%)[?]"
          - "turn on [the] {lightname} (light|lite) [to] {OneToHundred} (percent|%)[?]"

And in intent_script.yaml, I have the following:

lightOn:
  action:
    - service: "light.turn_on"
      data:
        entity_id: "{{lightname}}"
        brightness: "{{100 * 2.5}}"
  speech:
    text: >
      {{ state_attr(lightname, 'friendly_name') }} on

lightOnControl:
  action:
    - service: "light.turn_on"
      data:
        entity_id: "{{lightname}}"
        brightness: "{{OneToHundred * 2.5}}"
  speech:
    text: >
      {{ state_attr(lightname, 'friendly_name') }} to "{{OneToHundred}}" percent

lightOff:
  action:
    service: "light.turn_off"
    data:
      entity_id: "{{lightname}}"
  speech:
    text: >
      {{ state_attr(lightname, 'friendly_name') }} off

For reference here is the source where I found this info, that link should at least have been in the docs IMHO: