Good morning HA community, I’m trying to set a google home max volume with a potentiometer attached to an ESPHome device but am running into an issue probably with syntax on my end. HA is letting me know in the Automations tab that my yaml is not correct.
That led me to the developer section where HA doesn’t seem to have a problem with the same bit of code.
My automation yaml
description: ''
trigger:
- platform: state
entity_id: sensor.rotary_encoder_3
id: sensor.rotary_encoder_3
condition: []
action:
- service: media_player.volume_set
target:
device_id: 5a3838ba2c012cf630bbddda0b307ee8
data:
volume_level: '{{(((states('sensor.rotary_encoder_3')|float)*(('.01')|float))|string)|round(2)}}'
mode: parallel
max: 10
I’m reading the documentation and it’s stating that volume_level should be a Float, why is HA wanting a string? Thanks.