#Alex Room Commands

1 messages · Page 1 of 1 (latest)

calm lake
#

Because I want for example use this to also control the room with the app

autumn canyon
#

With the HA app?

calm lake
#

Yes

#

My plan is to have a central automation (in HA) and can use it in the HA app and trigger it by Alexa

autumn canyon
#

You can create a template switch in HA that is exposed to Alexa called “basement lights”

calm lake
#

I used iobroker before. There I had a variable that controled he room light.

If I say "Alexa room light on" even if the room light variable is already on, the variable in iobroker get "refreshed". In iobroker I can use a variable as trigger even if the variable is only get refreshed to the same state

#

That was the trick there

autumn canyon
#

You can also do the same with a toggle helper. And you could use that helper as a trigger for an automation. And that helper can be exposed to Alexa as a switch

calm lake
#

You said Alexa would trigger that variable also?

calm lake
#

Or can I?

autumn canyon
#

Yes you can

calm lake
#

Oh well

autumn canyon
#

Trigger on state, from on to off

calm lake
#

But my helper for example is already on and I say "Alexa "helper" on"

#

But you say alex is, even if the light is already off, triggering "light.turn_off"?

#

Could I capture this and use it to call a automation

calm lake
#

?

autumn canyon
#

When nearly anything happens in HA, an event is communicated on the events bus. You can use events as triggers in an automation

autumn canyon
#

here's a trigger that I tested out for a light; this triggers whether the light is turned on or off, regardless if it is on or off:

platform: event
event_type: alexa_smart_home
event_data:
  request:
    namespace: Alexa.PowerController
    entity_id: light.office_status_light
#

and I just confirmed that an input toggle helper can be exposed to Alexa as a switch, and turning it on while it's already on, and turning it off while it's already off, will trigger the automation:

alias: "Test: Event Listen"
description: ""
trigger:
  - platform: event
    event_type: alexa_smart_home
    event_data:
      request:
        namespace: Alexa.PowerController
        entity_id: input_boolean.virtual_switch
calm lake
#

Sorry for this maybe dump question, but what do I see there? Is this an template? (never used before) Or is this the config for the alexa?

autumn canyon