Controlling input_slider controls with Alexa?

Hi,

for some reason, I’m finally able to find my emulated_hue instance with Alexa.
I have exposed a bunch of input_select switches and I can turn them on and off using Alexa voice commands.
So for the next step, I’d like to be able to set the target temperature of my thermostats with Alexa.
Since there’s no native support for that, I have created an input_slider control that, when its state changes, triggers an automation to set the thermostat’s temperature.

I have exposed this slider too and my Echo does find it when searching for smart home devices.
But when I try to change the temperature through Alexa, it always replies that the device is not responding (rough translation from German).
Is it even possible to set slider values through Alexa? Are there any constraints that I have to be aware of?

TIA,
Sebastian

Noone able to help?
I only want to be able to tell Alexa something like “Alexa, set {Kitchen Heating} to 20”.

Sebastian

Hi Sebastian,

Here is what I’ve done and it’s working great without input sliders.
Here are my scripts:

  living_room_temperature:
    sequence:
      - service: climate.set_temperature
        data_template:
          entity_id: climate.sinope_living_room
          temperature: "{{ requested_level }}"
  office_temperature:
    sequence:
      - service: climate.set_temperature
        data_template:
          entity_id: climate.sinope_office
          temperature: "{{ requested_level }}"
  bathroom_temperature:
    sequence:
      - service: climate.set_temperature
        data_template:
          entity_id: climate.sinope_bathroom
          temperature: "{{ requested_level }}"

Regarding the input slider, I also have some scripts for changing volume:

  office_volume:
    sequence:
      - service: input_slider.select_value
        data_template:
          entity_id: input_slider.office_volume
          value: "{{ requested_level }}"
  living_room_volume:
    sequence:
      - service: input_slider.select_value
        data_template:
          entity_id: input_slider.living_room_volume
          value: "{{ requested_level }}"

However, I have a weird issue where Alexa cannot put a volume above 11. I’m working on that.

1 Like

OMG! You made my day!! :smiley:
I did some digging a few days back and saw that it’s apparently a limitation of the emulated_hue code not being able to deal with input_slider controls.
I wasn’t aware that you could use requested_level to get the “argument” from alexa.
I just tried it and this actually works! :slight_smile:
This is so great, since this now opens countless possibilities for me!
Doing things with scripts is even better than the slider-Workaround I had in mind.

Thanks a lot for that!

Sebastian

1 Like

Hi There, thanks for this it has the developer console at last talking to HA and providing the speech reply but its not adjusting the temp with climate.set_temperature or reporting this back in the response, I include:

speech:
  type: plain
  text: >
    I have set downstairs temperature to {{ requested_level }} degrees

Would be very helpful if your able to advise what you included in your custom intent fields in the console to get your intent/script working or a copy and paste of the json script in developer console; I’m at a bit of a loss with the intent fields/slots.

Cheers