Xiaomi Rington Volume Slider dosen't work

My Volume Input slyder doesn’t want to work. I always get the same error. I did not find a solution. Can someone give me a hint Thank you.

Invalid service data for xiaomi_aqara.play_ringtone: expected int for dictionary value

input_number:
  gateway_volume:
    name: Volume
    initial: 10
    min: 0
    max: 100
    step: 2
    icon: mdi:volume-high

  alarm_starten:
    alias: "Alarm go"
    sequence:
    - service: homeassistant.turn_on
      entity_id: light.gateway_light_7811dcbxxxxx
      data:
        brightness: 255
        rgb_color: [255, 0, 0]
    - service: xiaomi_aqara.play_ringtone
      data:
        gw_mac: 7811DCB9EC0B
        ringtone_id: 1
        ringtone_vol: '{{ states.input_number.gateway_volume.state|int }}'
1 Like

I found the problem myself:

Wrong:

  • service: xiaomi_aqara.play_ringtone
    data:
    gw_mac: 7811DCB9EC0B

Right:

  • service: xiaomi_aqara.play_ringtone
    data_template:
    gw_mac: 7811DCB9EC0B