How Flexible is Alexa with HA Cloud? (Very is the answer)

I am thinking about signing up for Home Assistant cloud, and migrate all of my node-red “lights”

I have one flow that is very important and I need to make sure that it can be replicated.

I have a Smart Light and an RF light switch, turning off the switch cuts the power to the light.

If the RF Switch is turned off manually, the light shows as unavailable in HA, which is handy because.

The Flow I have made is

“Alexa, turn on the light”

Check Status of light in HA -> if “off” -> carry the payload and use “Light Turn_On”

Check Status of light in HA -> if “on” -> do nothing (carry payload to change brightness etc)

Check Status of light in HA -> if “unavailable” -> send RF Signal to turn the switch on

I have also made a 2nd flow that sets the light to “Soft white” when I set it to white in Alexa

Is this level of flexibility available in HA cloud?

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.

Hope that helps

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?

IT WORKS! I Finally invent something that works!

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

The best ideas are the simplest

1 Like