Nodered trigger on LG tv state

Hi

I have an LG tv, Home assistant has detected this and made an entity called :

media_player.lg_webos__smart_tv

This can either be “on” or “off” based on, if the TV is turned on or off.

I would like this to trigger my Ikea blinds.

So basically “If LG Tv state changes from off to on, , make blinds go down”, “if LG tv state changes from on to off, make blinds go up”

It seems that NodeRed can be made to do this, but as i am very new to NodeRed, and NodeRed seems a bit over my head (I have VERY limited programming skills or experience), i was hoping someone would nudge me in the right direction as it seems very overwhelming right now.

I have searched youtube but not found any toturial for a scenario like this, so i am asking here.

This is pretty straight forward an event state node for the automation trigger, ie lg tv on/off. Then call service for the action this change triggers.

image

There are a lot of videos that cover the basics, I suggest watching a few.

I tried and tried.

If i make one like you show it will work, but i have to connect the “close blinds” to the bottom one, even if i put in that true = on

So that’s great, works every time.

If i duplicate it and in the new one set “true = off” it just does not work, either way.

I can see that if i turn off the TV, both the on and off is being triggered, so i added 2 seconds to the “If state is on … for 2 seconds” but it did nothing for me.

I also tried just doing one of the state ones and putting “blinds up” and “blinds down” on each output, but that did not work either.

Is there some sort of “bulb” i can attach to outputs and see the state of a node output. For debugging purposes ?