Android TV stays on when switching actions

I use Android TV on my Sony Bravia.

For example, when I start the “Watch TV” activity, everything works perfectly. When I end this activity, everything works perfectly as well.

However, if I switch from the active “Watch TV” activity to the “Listen to Radio” activity—which involves only the Denon AVR—the Sony TV remains on but should switch off.

I tried build-in-integration as well as the external integration. Both show the same behaviour.

Log-File is here.

Here’s how the sequence looks like:

Start and end sequences of both activities would be interesting. I saw http request commands what do they do?

Ralf

HTTP Requests are for LightManager AIR (Background-Light, Subwoofer, etc).

Here’s the Radio-Sequence

CEC deactivated? Both in the same group?

Ralf

Sure. (I hate CEC :wink: )

Yes.

I did one more test:

I created an activity “Nur TV” which only includes the Android TV.

Starting: Works find; TV goes on

Ending: Works fine; TV goes out

Switching from Activity “Nur TV” to Activity “Radio” leaves the TV on.

It looks like the switching between actions isn’t working smoothly, as the TV remains on.

It is interesting that the status of the BRAVIA is set to “unknown” and remains there all the time.

All other entities have and change their status.

Then i changed controlling the TV from integration to IR and with that the TV is switched off like expected.

So for me it looks like something is going wrong inside the integration Android TV.

Your Sony Android TV has an unknown state. This can cause such issues as the remote doesn’t know the state of the device. You can see in the log that the TV is not included in the newly created off sequence but only the Technisat receiver that has a known state (ON):

  • 2026-05-21 08:42:24.609904 +00:00 core NOTICE [Wohnzimmer] Created power-off sequence: [{“type”:“command”,“command”:{“entity_id”:“uc.main.0d085c63-c836-4877-ba79-ef3ec840c971”,“cmd_id”:“remote.off”}}] Entities in old activity: [“BRAVIA 4K VH22 (androidtv_custom.main.38B800E9C21C) UNKNOWN”, “HTTP Get (requests.main.http-get) ON”, “TechniSat DIGIT ISIO STC (uc.main.0d085c63-c836-4877-ba79-ef3ec840c971) ON”] Entities in new activity: [“HTTP Get (requests.main.http-get) ON”, “Denon AVR-X1800H (uc_denon_driver.main.media_player.DCFW032408801) OFF”, “Denon AVR-X1800H Remote (uc_denon_driver.main.remote.DCFW032408801) OFF”]

  • 2026-05-21 08:42:24.584138 +00:00 core NOTICE [Wohnzimmer] found running activity ‘Fernsehen’ (uc.main.b2c0c7e4-7d45-4f51-ace6-ecc475cfb359) in the same activity group. Power-off strategy: always

  • 2026-05-21 08:42:24.580519 +00:00 core NOTICE Starting activity ‘Radio’ (uc.main.fdced669-cb5f-47d5-8d02-b3e48d5f2518) in activity group: ‘Wohnzimmer’ (default)

Ok and how can that be fixed?

That might be an integration problem. Can you monitor the entity state shown in the web configurator when you turn it on and off using the remote and media player entity?
I also noticed that your Android tv integration driver id contains a _custom postfix. Is there a reason why you’re not using the included version? Maybe you also could have mixed up entities from both the internal and custom variant?

Did it and it still stays on “unknown” all the time.

First i used the included version with the same problem. Therefore i tried the “external” without success.

Who will inform the developer of the integration about that? Will you do it or should i open an bug on Github?

You should do this and include logs when you tried to change the state manually.

Done.

Can be found here: Android TV stays on when switching actions / doesn't change status · Issue #790 · unfoldedcircle/feature-and-bug-tracker · GitHub

I am not sure if it might help as I have Philips:

  1. There is an XML file for Sony and request integration. I think power on/off are also included.
  2. ADB integration has power_state_on and _off. Not sure if these commands work for activity switch because the names are untypical.

Ralf