AndroidTv : Using google home to change a tv channel on Nvidia shield, using helpers and node red

Hello,

I have an Nvidia shield (android TV). I have installed correctly the google integration so I can see all the home assistant entities in google home app on my phone.

I want to trigger google home with a channel name. It will call a routine inside google home which will trigger a flow in node red that will send an ADB command to the nvidia shield which will change the channel on a specific application (tivimate).

I have already done most of the things (after reading a lot) and I need some additional suggestions to finalize the project.

I've created on home assistant a Helper with the name of the channel. It is an input boolean. In node red there is state node on this input boolean which is waiting for a change in order to activate the rest of the flow.

In google home the input boolean is seen as a virtual switch, so it can been turned on or off using the voice. So I have to tell "ok google, turn on or turn off <>". I can also tell "activate <>". But I do not like it so much.

I want to call the routine using only the channel name "<>" or at least with activate <>. I do not want to repeat every time turn it on or off. I cannot remember the previous state, and I do not want to enter in home assistant to check what to tell (or in google home app).

So my first idea was after "activate" with my voice the flow, to revert back the value of the boolean variable to off.

So I tried inside node red to change the value of this boolean using global.set function...

global.set("homeassistant.homeAssistant.states["input_boolean.raiuno"].state","off")

It changes the value inside the debug view, but nor in home assistant neither in google home.

Any ideas what to do? If there is also other way to do this, I am not forced to use a boolean variable.

Thanks.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.