I’m using a rotary encoder to control the volume of my amplifier but when I increment the volume by 0.01 the volume on the amp is capped at 6 (max is 100). When incrementing by 0.011 it works as it should going all the way to 100 although it needs a quick spin back to hit 0.
- platform: rotary_encoder
name: "ampvolumeespp"
pin_b:
number: 33
mode: INPUT
pin_a:
number: 25
mode: INPUT
max_value: 200
min_value: 0
resolution: 1
on_clockwise:
- homeassistant.service:
service: media_player.volume_set
data_template:
entity_id: media_player.marantz_pm7000n
volume_level: "{{ state_attr('media_player.marantz_pm7000n', 'volume_level') + 0.01 }}"
- logger.log: "Turned Clockwise"
on_anticlockwise:
- homeassistant.service:
service: media_player.volume_set
data_template:
entity_id: media_player.marantz_pm7000n
volume_level: "{{ state_attr('media_player.marantz_pm7000n', 'volume_level') - 0.01 }}"
- logger.log: "Turned Anti Clockwise"
I don’t know if this is an issue with my amp, the media player component or ESPhome, but it’s seems odd and maybe a bug?