Emulated Hue Dimming with and without Alexa/Echo Dot

I would like to use Alexa to increase and decrease the volume of my amp, which is triggered via command line(IR transmitter). I have it working when I say “Alexa, turn on VolUp”. It’s a bit of a kludge, and I think I can do better so here we go…

I created an Emulated Hue Script that allows me to say “Alexa, increase Emulated Hue” and the brightness value increases. Ideally, I would like to set the brightness to, say 100, upon HA startup and have Alexa increase and decrease the brightness from there. From there I could fire volume up or down IR commands depending if the brightness was more or less an 100.

My issue is that I’m able to set the brightness of the Emulated Hue script via Alexa, but am not able to set it from within Home Assistant.

As a reality check I’ve done the following: In HA Developer Tools -> Services: Domain = light, Service = turn_on, Service Data = { “entity_id” : “light.kitchen_island”, “brightness” : “200” }, click [Call Service] and voila the brightness is set to 200 when I view it at: http://localhost:8300/api/pi/lights. When I try the same Data command with the Emulated Hue entity_id (script.jefferson the Emulated Hue), and visit http://localhost:8300/api/pi/lights I get no joy. The value of the Emulated Hue script haven’t changed. I’m wondering why the Emulated Hue Script brightness level from within Home Assistant won’t change, even though Alexa can do it without any problems.

Thoughts:
Can an Emulated Hue script “device” be dimmed? I’ve tried a boolean_switch based Emulated Hue “device” as well, but still no dice. Is this a limitation of Emulated Hue? Should I be using HA Bridge instead? Is there a another/better way to dim the Emulated Hue script via Home Assistant?

Any pointers from the community would be greatly appreciated. :slight_smile:

Cheers,
Mike

configuration.yaml
 customize:
   script.jefferson:
     friendly_name: 'Emulated Hue'
     emulated_hue: true

emulated_hue:
  host_ip: 192.168.1.x
  listen_port: 8300

I don’t think you can dim your script in this instance. The problem that I think you’ll have here is that HASS at no point actually knows the brightness of your amp. How does the IR remote work? Is it just a standard volume up/down type thing? Because the issue is that HASS doesn’t know where you started at.

I think that if you want to keep everything within HASS, the simplest option would be to have two scripts; one for up, and one for down. Alternatively, IIRC, HA-Bridge lets you set separate commands for each voice command, so you could have ‘on’ be louder and ‘off’ be quieter’.

After thinking about it for a bit, I think there might be a third way which would be optimal, which would be to set up a series of automations, but it would depend on how you’re doing your IR; are you using a specific blaster?

Thank you for your feedback dramamoose.

I’m controlling my amp via a Raspberry PI based IR blaster found here. It basically controls Volume Up or Volume Down.

I don’t really care if HA knows the brightness of my Amp. All I care about is whether the brightness of the Emulated Hue Script is increasing or decreasing, so I can fire an IR Volume Up or Volume Down command respectively. In order to determine if the brightness level is going up or down(via an Alexa voice command) I need to set the initial brightness as a starting point, hopefully via HA.

After a bit of trial and error, I figured out how to accomplish what I wanted. Click here to see a writeup of how I did it!