#Voice assist change number

1 messages · Page 1 of 1 (latest)

cobalt fiber
#

Hi I can't seem to get numbers to change using assist. I get not aware of any device called xxxx. I have enabled assist and tried alias still get the same response. I've also tried the entity ID. Please can someone point me in the right direction to make this work.
Thanks

deep kayak
#

what do you mean with numbers to change

#

what is the actual voice request you are using?

cobalt fiber
#

set 'number name' to 3

#

I have a numbers which tracks the scene of a lighting system via RS232 in Node red. So changing Lounge current sc to 1 for instance selects scene 1 on the lighting system . So i thought if I add an alias of lounge light or lounge scene it would work.

deep kayak
#

there are no built in intents to set a value of a number entity

#

If you want to set values of number entities, you need to create something yourself

#

In this case I think it would be easiest to create a custom intent in custom_sentences and combine it with an intent_script as you can limit your sentences to only trigger on number entities

#
# Example config/custom_sentences/en/set_number.yaml
language: "en"
intents:
  SetNumber:
    data:
      - sentences:
          - "(set|change) <name> to {set_value}"
        requires_context:
          domain: "number"
lists:
  set_value:
    range:
      from: 0
      to: 100
#
# Example configuration.yaml
intent_script:
  SetNumber:
    action:
      action: number.set_value 
      data:
        entity_id: "{{ states.number | selectattr('name', 'eq', name) | map(attribute='entity_id') | list }}"
        volume_level: "{{ set_value }}"
    speech:
      text: "Value changed to {{ set_value }}"