#Alex Room Commands
1 messages · Page 1 of 1 (latest)
With the HA app?
Yes
My plan is to have a central automation (in HA) and can use it in the HA app and trigger it by Alexa
You can create a template switch in HA that is exposed to Alexa called “basement lights”
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
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
You said Alexa would trigger that variable also?
That was my plan But it seems that I can't trigger an automation with that if the helper get "changed" from "on" to "on"
Or can I?
Yes you can
Oh well
Trigger on state, from on to off
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
?
When nearly anything happens in HA, an event is communicated on the events bus. You can use events as triggers in an automation
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
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?
That’s the first half of an automation. You’d need to add whatever conditions and actions you want