Help with FP2 + M3 (IR) automation to turn off TV (toggle problem)

Hello everyone,

I’m learning to create automations and I’ve run into a problem I don’t know how to solve. I would greatly appreciate your help.

My setup: I have an FP2 presence sensor and an M3 Hub.

The automation I created: If the FP2 doesn’t detect anyone in my room for more than 10 minutes (between 9:00 am and 7:00 pm), I want all devices to turn off.

What works well: The automation perfectly turns off all my Matter devices that are linked to Aqara Home.

The problem (with my TV): I have a TV with a Chromecast (Google TV), so I can’t add it directly to the automation. My solution was to add the TV remote to the M3 Hub and, in the same “away” automation, add the “press power button” action.

At first, I thought it was working. But a couple of times I came home and found the TV on. I understand what was happening: my power button is a toggle (a single button for turning the TV on and off).

The “10-minute absence” automation doesn’t run just once; it keeps triggering while I’m still away. Therefore, the M3 was turning the TV on and off every 10 minutes.

My question: Do you have any suggestions for a reliable way to turn the TV off?

I understand my mistake was using a toggle button in a repetitive automation. Is there a way to configure the automation to run only once when the status changes from “present” to “away” and not repeat while I’m still away? Or perhaps there’s a way for the M3 to send a “discrete” off-only signal?

Please excuse my mistake, but I’m still learning.

Any comments or suggestions are greatly appreciated.

Regards!

1 Like

Hi. Can you share a screenshot of the automation with us?

2 Likes

If I am not mistaken, automation 2.0 allows you to trigger this automation once. I could be wrong but I’m sure I saw it in the automation tab.

I believe this would solve your problem.

2 Likes

May the IR device cant add directly ib to the automation, may you create a Scene with The IR bottom, then create an automation with that Scene

3 Likes

Yes, I also would try it with a scene this way!
And show us your automation/,scene for it

1 Like

yeah sure!