Alexa control Emulated Hue or another method, very confused

Hi, still very new to HA.

I have managed to get daenny script working, https://community.home-assistant.io/t/simple-script-to-enable-amazon-echo-alexa-to-set-the-temperature-on-a-climate-thermostat-device-via-the-emulated-hue-component/7924

And my Dot discovers it. I have Changed the word Thermostat to light and echo can run the script. But there seems to be a lack of examples of code code to show me how to Turn a service “On” and then “Off”.

Are people not using the Emulated Hue?

Could anybody point me in the right direction to turning soomthing On & Off using Alexa.

I just need a few examples, I am used to writing code in assembler, so this is a bit different.

Regards, Dave

Hey Dave,

I use emulated_hue for Alexa control. Since Alexa is voice, there isn’t much coding that is necessary once you have emulated_hue up and running. The most I do is expose and hide entities to the emulated_hue using customize scripts. You can see them below:

https://github.com/CCOSTAN/Home-AssistantConfig/blob/master/customize/switches.yaml#L8

This way I can just say ‘Alexa, turn on/off the Garage Outlet’ and Boom, Magic happens.

As ccostan said add the item you want to control using emulated_hue: true and then tell alexa to turn it on/off. You can also add a whole domain (group/light/etc.) but that can add alot of items so I have been doing them one by one.

Also check your alexa app and see the name that is exposed to alexa. Say “alexa, turn on” the name in the app and it should turn on within a second or two.

Thanks for the replies

So I have added in my code this, but what am I missing, Alexa can’t see anything, if I set expose_by_default to true, Alexa sees my switches but not garage outlet.

Still trying to go though your files to see how they link up.

emulated_hue:
  host_ip: 192.168.1.71
  listen_port: 8300
  expose_by_default: false

###################################
##  Switches Section
###################################
switch.garage_outlet: 
  friendly_name: 'Garage Outlet'
  icon: mdi:power-plug
  assumed_state: true
  emulated_hue: true     

switch:
  platform: rpi_rf
  gpio: 17
  switches:
    garage_outlet:
      protocol: 1
      pulselength: 184
      code_on: 349491
      code_off: 349500

Ok, been going through your code, and did not realize that the Switch section had to be placed under “Customize”.

Now working, posted this to help others

  customize:
    ###################################
    ##  Switches Section
    ###################################

    switch.Socket_3: 
      friendly_name: 'Garden Lights'
      icon: mdi:lightbulb-on
      #assumed_state: true
      emulated_hue: true