Hi everyone,
I have integrated my Samsung UE55RU7172 into Home Assistant using the SamsungTV component.
At this point I can properly turn ON/ OFF the TV, change channels and volume,change the input source.
What I would like to do now is to use the TV status in order to control a bluetooth speaker; so, the speaker must switch ON when the TV is on, and switch OFF when I shutdown the TV.
I created the following automation for switching ON:
- alias: BT speaker auto-on
trigger:
platform: state
entity_id: media_player.livingtv
from: 'off'
to: 'on'
action:
service: switch.turn_on
entity_id: switch.BTspeaker
and a similar one for turning OFF.
It works; but I have some issues because, randomly, a wrong TV status is detected in HA: the status is set to OFF, but actually the TV is up and running!
I report down here a screenshot of the HA logbook:
In this case:
- I turned ON the TV at 1:13:29 PM;
- At 1:25:08 PM, status switched to OFF (while TV is ON);
- After 10 seconds, the status is set back to ON;
- At 1:34:02, the scenario is repeated again (Status OFF, then ON again).
This strange behaviour is obviously causing the BT speaker to turn OFF and ON continuosly:
Maybe I could solve the problem by “filtering” the OFF/ ON transition in the automation script, but that’s not a clean solution.
Has anyone around here faced a similar issue? Do you know if this can be related to the TV sending somehow a wrong status message, or it is related to the SamsungTV component handling?
Thanks in advance!