yi-hack_ha_integration icon indicating copy to clipboard operation
yi-hack_ha_integration copied to clipboard

Privacy switch enabled when media player gets deactivated

Open aqwserf opened this issue 3 years ago • 3 comments

Hi!

Moving forward on my automation, I noticed that when I deactivate the media player in HA, the privacy switch is automatically activated, with around a 20s delay:

image

Same behavior happens when I activate the media player, the privacy switch is set to off:

image

I've tested on both MStar and Allwinnerv2, same behavior.

FYI, MQTT is disabled on every camera as I use Frigate for motion detection, but I guess it has not impact as these 2 controls use API.

BTW, no matter if media player is on or off, I can play TTS using HA TTS service. Is there another purpose for this switch?

Thanks!

aqwserf avatar Dec 01 '22 10:12 aqwserf

Hum, after reading the code, I guess why it's happening:

https://github.com/roleoroleo/yi-hack_ha_integration/blob/9910c442ff8023c5115edcc56f7836b8e0cff70e/custom_components/yi_hack/media_player.py#L151-L152

https://github.com/roleoroleo/yi-hack_ha_integration/blob/9910c442ff8023c5115edcc56f7836b8e0cff70e/custom_components/yi_hack/media_player.py#L166-L167

So my question is why? We should be able to turn on/off the media player without impacting privacy? Or again, I don't get the purpose of media player ^^

aqwserf avatar Dec 01 '22 10:12 aqwserf

You are right. By design, media_player switch and privacy switch have the same behavior. I should change media_player switch to disable tts (or media playing in generale) when it's switched off.

roleoroleo avatar Dec 02 '22 07:12 roleoroleo

Ok, so if I understand correctly, privacy switch is impacted by media_player switch, and media_player switch has not impact right?

aqwserf avatar Dec 02 '22 08:12 aqwserf

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 02 '24 02:04 github-actions[bot]