So as said in the other post, I have 2 Tuya door sensor that they are not accessed in Smart Life app from HA, and I’m unable to find their IP, as they connect only for 1 second when door opens and closes, so manual IP configuration for them it’s imposible. The workaround that I found is, as Alexa recognize it, is to have a smartplug to be turned on when the door is open. The issue of this system is that I have to have a smart plug (well, two as they are two sensors) only used of this.
The idea, to solve this issue, is to have a virtual small plug/light/other device that Alexa con turn on and so HA will recognize it. This is usefull for a Home Made alarm system.
So following yout steps, I created a light, but of course I’m doing something bad, because the virtua light is not turning on and off and neither Alexa finds it. The current configuration is the one that I added in the previous post.
I have several Alexa, a Nest Mini and a Hue Bridge with some lights.
OK . small steps .First you have to get Emulated hue , or Nabu Casa working. see
You must able to get a device from HA to be recognised by Alexa , otherwise you have nothing to trigger.
Once you have a device from HA in Alexa . You can create a routine in Alexa that when the motion detector is activated you get alexa to trigger that HA device (switch, bulb , script , etc). That’s the idea for the virtual bulb its just a trigger for HA to react too.
Thanks for this links. I managed to create following the instructions the virtual light, but I have 2 problems now with it.
Problem 1: It duplicated all the lights, don’t know if you know a way to undo this and only to have the new lights.
Problem 2: HA and Alexa are unable to turn on and off the light created that I named “Alexa Luz Sim Entrada”. Here I think the issue is #Luz Falsa# that script “script.theater_lights_on” doesn’t exist in my HA, but when creating it, I don’t know what to do with or activate.
If you can help, (another time) I really apreciate it a lot.
Thanks again for the reply. So I’ll remove that and manually delete it.
The script " script.theater_lights_on" I have not created anything, only added that commanad. You think that a script inside HA with the same name has to be created?
If not, I’ll raise a thread with it. Thanks again (a 1000) for your help!
If I removed the "expose_by_default: true" it will cause that all the devices are detected. So I keep it. Manually I can remove the other devices, but they do not disturb right now, also if they are duplicated. The expose to false maybe I can do it once I want to add more lights or things to HUE, or if removing the rest and doing a future manual check.
To solve the issue with the light on/off I removed the script part and is working, so I left it as:
Just had another issue after one of the last updates, and the turn_on and turn_off gives an error “Inccorct type. Expected “object””. But I’m unable how to solve it.
light:
- platform: template
lights:
theater_lights:
friendly_name: "Alexa Sensor Sim Entrada"
turn_on: *Here is the error code*
turn_off: *Here is the error code*
Solved. The issue was that there is a condition that execute or not the automation if any person is ‘at home’. This variable always returned away, so the automation was running fine, because for HA nobody was at home.
Because if that I decided to use input_booleans instead with corresponding names, e.g. input_boolean.safety_check or input_boolean.temperature and so on.
There is no wrong solution as long as it works . I Sometime use the Alexa app on my phone when Im away , so only having 1 entity exposed from HA keeps thing much neater . I had 12 scripts and three input_booleans in Alexa all with unique names so I could call them correctly . Now I have Alexa routines which set the virtual bulb and I one automation in my case NodeRed which call the correct subflow and then reset the bulb.