Hello, I just want to create a virtual on off switch that I can export to Google Home Assistant and give the voice command on or off to, which will then initiate an automation within Hass.io
I tried various ideas with binary_sensor…templates, generic switch platform but these all seem to need an actual hardware device and it seems like I can not be the first to have this idea.
I have the automation worked out, just need the yaml to create the switch which will be the trigger please.
I did see this, it relies on existing hardware, I want it as a standalone entity. I might look at exporting automations to Home Assistant and use one automation’s on off state to trigger the other automation.
I’m trying to go the other way around, I want an automation that when a device state changes (device_tracker for instance) changes state, the input_boolean ‘switch’ is toggled. But it is n entity and not a device so I cant select it.
expose the boolean as a switch. Keep in mind there are caveats that are annoying when doing this. Like, turning the switch on when the boolean is on will be suppressed because it’s already on.
I don’t know if you can change the display_category from the UI. I would assume you can. If you’re using the smart home skill and not cloud, the configuration is similar
I have a toggle for turning lights on/off, but want it to reflect the state of the light(s) event if I turn them on manually. Unless I misunderstand, this is similar to what you’re looking to do?
alias: (update lights toggle OFF)
description: "Update state of lights toggle"
trigger:
- platform: state
entity_id:
- switch.10001bba45
attribute: state
from: "on"
to: "off"
condition: []
action:
- service: input_boolean.turn_off
data: {}
target:
entity_id: input_boolean.lighting
mode: restart
Might be simpler ways to do this, but as a rookie I’m just happy to get it working …
I have saved the config and restarted HA then got Alexa to do a Discovery. This didn’t find anything. I tried Disabling the Skill, the re-enabling it and then doing the Discovery but still nothing.