TCL smart tv android integration dropping connection randomly and frequently

Hey all, first post an so far only problem I haven’t been able to sort out myself with others experiences here. I can’t seem to get my TCL smart tv to stay connected with android remote integration. When it works it works great, but usually only stays connected for less than a minute then the integration goes offline for a while before coming back and cycle repeats. TV is connected on wifi to the same network that is being passed through to HA. I’ve set up an automation to ping the TV/integration every 30 seconds as I read that solved the issue for lots of other users which did make it slightly better but hasn’t fixed it. Have also set the tv to keep network active and enabled screenless services and set static IP for the tv in my router. Only other things I’ve thought of but haven’t been able to try yet is connecting it directly with an ethernet cable but that’s an expensive test that I currently don’t hold much hope in. I’ll try to attach the ping code I’m running incase I’ve set that up wrong otherwise I’m open to suggestions.

alias: TV ping
description: ""
triggers:
  - seconds: /30
    trigger: time_pattern
conditions: []
actions:
  - target:
      entity_id:
        - media_player.living_room_tv
        - remote.living_room_tv
    data:
      entity_id:
        - media_player.living_room_tv
        - remote.living_room_tv
    action: homeassistant.update_entity
mode: single

Edit: the logbook from the integration from last night, seems just completely random to me…

November 5, 2024
Living Room TV turned off
9:46:00 PM - 17 hours ago
Living Room TV became unavailable
9:45:44 PM - 17 hours ago
Living Room TV turned off
9:39:47 PM - 17 hours ago
Living Room TV became unavailable
9:39:24 PM - 17 hours ago
Living Room TV turned off
9:30:10 PM - 17 hours ago
Living Room TV became unavailable
9:29:44 PM - 17 hours ago
Living Room TV turned off
9:26:38 PM - 17 hours ago
Living Room TV became unavailable
9:26:04 PM - 17 hours ago
Living Room TV turned off
9:24:36 PM - 17 hours ago

Your AP and TV must support a connection of a device in sleep mode, because it is not be having as a normal online device.

If your AP or TV can not do that, then a wired connection is to be preferred.

The settings in your TV does often not indicate whether it is working on wireless, wired or both types of connections, so you might need to study all available documentation for your TV.
Wired connections are easier to support i. The sense that a connection do not have to be enabled or kept alive, so wired normally always have the abilities.