Hi everyone, this is the automation I set up:
alias: Google Home - Imposta volume soggiorno
description: ''
trigger:
- event_data:
action: increase_vol_soggiorno
event_type: ifttt_webhook_received
platform: event
condition: []
action:
- data:
volume_level: '{{ ((trigger.event.data.volume_level|int)/100) | float }}'
entity_id: media_player.soggiorno
service: media_player.volume_set
mode: single
It basically should get the volume_level data from the webhook json as integer number and use it to set up the volume level of the media player after converting it to float dividing by 100.
I tested the code within the templates view and I actually get a float number, so it looks like the code for the math is right.
Could you please help me to understand what I’m doing wrong?
Thanks a lot!!