Hello,
I have been playing around with this for hours with little success. Either I’m missing something very simple or all of the examples I have come across whilst searching are no longer relevant.
I’m trying to control the volume of a media player using IFTTT webhooks and I have tried multiple variations with no results whatsoever. This is what I have so far in testing…
JSON Body:
{ “entity_id”: “script.soundbar_adjust_volume”, “volume_amount”: “{{NumberField}}” }
Automation:
- id: IFTTT Soundbar Volume
alias: "IFTTT Soundbar Volume"
initial_state: True
trigger:
platform: event
event_type: ifttt_webhook_received
condition:
condition: template
value_template: '{{ trigger.event.data.entity_id == "script.soundbar_adjust_volume" }}'
action:
service: script.soundbar_adjust_volume
data_template:
volume_amount: '{{ trigger.event.data.volume_amount }}'
Script:
soundbar_adjust_volume:
alias: 'IFTTT Soundbar Adjust Volume'
sequence:
- service: media_player.volume_set
entity_id: media_player.soundbar
data_template:
value: >
{{volume_amount / 30}}
I have many IFTTT webhooks that communicate with my Home Assistant instance successfully, but, am having very little luck with this one.
If anybody would be so kind as to point me in the right direction, it would be gratefully appreciated.
Thanks,
Ben