I have an intermittent problem with HA media player service volume control using a rotary encoder - it won't increase past a certain point (0.6)

This is a constant recurring issue and requires me to restart my amplifier or remove and re-add the amp in the integration to resolve , the amplifier is integrated into Home Assistant using the HEOS integration and works without issue inside HomeAssistant. Every few days the volume will be limited to 0.6 maximum even though the steps are increased by the encoder, decreasing volume works ok. The Sonos speaker that uses the same code isn’t affected and removing the Sonos lines makes no difference. Volume control in HomeAssistant isn’t affected and works as normal.

  - platform: rotary_encoder
    name: "ampvolumeespp"
    pin_b:
      number: 33
      mode: INPUT
    pin_a:
      number: 25
      mode: INPUT
    resolution: 1
    filters: 
      - debounce: 0.1s
    min_value: 0
    max_value: 9999999

    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 }}"
      - homeassistant.service:
          service: media_player.volume_set
          data_template:
            entity_id: media_player.sonos_amp
            volume_level: "{{ state_attr('media_player.sonos_amp', 'volume_level') + 0.04 }}"
      - 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.002 }}"
      - homeassistant.service:
          service: media_player.volume_set
          data_template:
            entity_id: media_player.sonos_amp
            volume_level: "{{ state_attr('media_player.sonos_amp', 'volume_level') - 0.04 }}"
      - logger.log: "Turned Anti-Clockwise"