Home Assistant cloud just exposes HA entities to Alexa . All states are handled by HA. I have a similar setup with Tradfri bulbs and Xiaomi switches . When power is removed from the tradfri bulbs . The alexa app reports the bulbs as unresponsive and obviously cannot turn them on as they have no power.
So I created three input Boolean’s in HA called Dark, Relaxed and Bright and exposed them to Alexa
When triggered in alexa “turn on Dark” or alexa “Dark” via routines it would turn on the input boolean . I could then trigger the Xiaomi Switch to turn on power , wait for the bulbs to come on line , then dim them to the dark “setting” or relaxed or bright .
If the bulbs are on . Alexa can change brightness or turn them off and on. This is too complex for my family the bulbs being off and the switch on. So I don’t expose the tradfri bulbs to alexa , just the switch.
I have Xiaomi switches throughout the house and expose them as bulbs to alexa (as they control dumb bulbs) . Only in the living room do I have smart bulbs as Xiaomi switches do not support dimming.
Damn that’s what I was hoping to avoid. It won’t pass the wife test.
Otherwise i could have set an automation for when the light is requested to be turned on, fire a script and have node red do the check and fire the RF if needed.
I’m guessing she will just say “Light isn’t responding please check it’s network connection and power supply”
As an idea what about putting 2 lights in a group, the real light and a fake MQTT light.
So she will turn on both, and MQTT light fires to Node-Red carries out the the Unavailable check? Will she still report a light as being unresponsive?
So if you add an MQTT light to a group, with a normal light and add the group as single entity to HA/Alexa if the real light is Unavailable it doesn’t care, because the MQTT light is still available.
Which means when we turn on the group an MQTT message with a payload is sent, Node-Red can listen for it and do anything we want from there, I Guess HA could do the same if you want to use an automation rather than Node-Red.
Here is my config
light:
- platform: tplink
name: Living Room Top
host: 192.168.1.57
- platform: mqtt
name: "Fake light"
state_topic: "fake/light/status"
command_topic: "fake/light/switch"
brightness_state_topic: 'fake/light/brightness'
brightness_command_topic: 'fake/light/brightness/set'
qos: 0
payload_on: "ON"
payload_off: "OFF"
optimistic: false
- platform: group
name: Test Lights
entities:
- light.living_room_top
- light.fake_light
cloud:
alexa:
filter:
include_entities:
- light.test_lights
entity_config:
light.kitchen:
name: Test Lights
description: Great Scott
You have to have the WAF and keep it simple. I use a similar idea with a dummy bulb so I can have a hundred triggers (brightness levels) in my alexa routines