RobertD502/home-assistant-flair

Overriding room active/inactive is a great idea

Closed this issue · 6 comments

Alexa can do this with native Flair integration with "turn off " so it should be doable with your scripts. I tried to parse your script and the flair API, but it's gobbledegook to me, sorry I can't help.

I'm not sure how HA would expose it to Alexa, so "Turn ON/OFF" should work, but she might balk with "set active/inactive" as she doesn't like some verbs for some reason. I guess that's abstracted by HA, so it's not something you set anyway?

There's some great custom thermostat tiles which would be awesome with a simple on/off button and the temp controls.

Sorry if this issues are the wrong way to offer encouragement, this integration is awesome.

This won't be hard to implement and is on my to-do list. I plan to use "input_select" entities for each room which will have the two options "Active" and "Inactive". I just tested out an input_select entity (from another integration) with Google Assistant and I am able to tell Google Assistant what to set the input_select entity to- doing this with Flair would allow for telling Google Assistant to, for example, "set Living Room to inactive".

Now you use Alexa and I can see from the documentation that input_select entities are not on the list of available domains that can be exposed to Alexa. In your case, you would have to work around this by setting up input booleans that are turned on or off via Alexa and then have automations in Home Assistant that set the corresponding input_select entity to either active or inactive based on if the corresponding input boolean is on or off.

The reason I am hesitant to create switch entities to control if a room is active or inactive is because it would cause problems with other devices specified to a room in Google Assistant and, perhaps, Alexa too.

For example, if I have a tv, lights, and other devices set up in the "Living Room" room within Google Assistant and I asked Google to "turn off the living room" in order to turn the Flair Room switch entity to off and in turn set the Flair room to inactive, Google will interpret this as me wanting for it to turn off every device that I have placed in the "Living Room" room in Google Assistant - the tv, lights, and other devices in the living room would all turn off.

Hey Robert, you're right about the switch entities - in Flair native alexa integration I would often turn on my AC when asking "Study Lights on", i never figured it out. I'm sure there will be a way I can make it work in Node Red easy enough for my wife to use.

Also, I thought I attached this issue on your milestone 4, sorry if it looks like asking for something new.

It's ok, I can assign it to the milestone.

I take back what I said about input booleans, instead I would use a template switch for each room. For example create a template switch that is called "Living Room Activity" and have its state be determined by the Living Room input_select entity (switch is on if the input_select entity is set to Active and switch is off if the input_select entity is set to Inactive). I would then set the switch to change the Living Room input_select to Active if the switch is turned on and change the Living Room input_select to Inactive if the Living Room Activity switch is turned off. Then you just expose the switch entity to Alexa.

You and your wife will then be able to ask Alexa to set "Living Room Activity" on or off. This way you'll avoid having Alexa think it needs to turn on/off all the other devices in the Living room, for example. Also, this way you won't even need to use Node-Red as everything will be controlled by Room Activity switches.

@Drulzy Setting the room to Active/Inactive has been introduced as a select entity in 0.0.5.0.

I'm probably missing something simple but I can't find a way to change the select entities(Active/Inactive) via a script of automation. Can anyone point me in the right direction? I assumed I would call a service like input_select but these select entities are not valid for that service time. I found Home Assistant Core Integration: Generic turn on works to set them to active but Home Assistant Core Integration: Generic turn off does not.

I'm probably missing something simple but I can't find a way to change the select entities(Active/Inactive) via a script of automation. Can anyone point me in the right direction? I assumed I would call a service like input_select but these select entities are not valid for that service time. I found Home Assistant Core Integration: Generic turn on works to set them to active but Home Assistant Core Integration: Generic turn off does not.

This can be done using the "select.select_option" service. The input_select service isn't used for select entities.

Just a heads up, general questions should be posted in the integration's Home Assistant Community thread. You had no way of knowing as I forgot to mention this in the documentation.