Hi
I’m using the HA companion app, and I’m trying to get my phone state, in order to make an automation that will lower the volume in my media player when a call enters.
I enabled this sensor in the app, and I can see the status of the phone under “Developer tools”.
I can also see that the state of the phone is changing from “idle” to “offhook” when I initiate a call.
So far so good.
The problem is that the automation is not being triggered when the phone is actual in use.
I looked at the logbook and there I found the problem - the state of the phone only changes to “idle” when the call is finished, but it’s not changing to “offhook” when the call starts. This is weird because in the developer tools everything seem fine.
This is how the automation looks like:
alias: Lower volume when a call enters
description: ''
trigger:
- platform: state
entity_id: sensor.poco_f2_pro_phone_state
from: idle
to: offhook
condition:
- condition: device
device_id: d90d679a93324a2dee70fde232733a7d
domain: media_player
entity_id: media_player.shield
type: is_on
action:
- service: media_player.volume_set
data:
volume_level: 0.3
target:
entity_id: media_player.shield
mode: single
Any ideas how to solve this?