Configuring dynamic addres for xiaomi_miio remote

Hi there,
I have a problem with my xiaomi_miio, that changes ip address because of the router. For me it is not possible to reserve an ip address because of my router.
I tried to setup my configuration to pull the ip from device tracker, but this is not working. (Please note that the ip in device tracker is correct and if I change manually to that ip the remote works)
Here is the config that I have been trying to use:

remote:
  - platform: xiaomi_miio
    name: "livingroom_remote"
    host: {{ states.device_tracker.mi_remote.attributes.ip }}

Any idea how I can make this work?

You wont be able to get this to work. Home assistant doesn’t reload configurations when things change. So even if this were to work, you’d need code changes to the whole platform. I suggest getting a router that allows dhcp reservation. In the long run with IOT, it will be much easier to deal with things.