Unifi device leaving or entering zone doesn't trigger in Home Assistant

Hi:-)
I trie to achieve that when the media center is started up and connects to the LAN, it will trigger the projector and such. The automation works, except that that the unifi module entering a zone doesn’t trigger it. If I jeck the device tile it stats the “sensor” home and away correctly. HA is running in a VM and works apart form this quite relayable.

Setting it up in the UI gives me this YAML:

platform: device
device_id: da1e1a352c216a99d000ce97fcd4e2da
domain: device_tracker
entity_id: device_tracker.mi_9t
type: leaves
zone: zone.home

Searching google brought up this:

    platform: state
    entity_id: device_tracker.mi_9t
    from: 'not_home'
    to: 'home'

Both do not work:-/ Any idea what I’m doing wrong?

Thanks for help:-)

I have this issue. Any fix did you find?

That will only work with a device_tracker with lat/lon attributes, unifi ones are just home or away when they are connected to the network controller. If you want to check a unifi device is at home, just use a trigger that triggers when the device_tracker's state changes to home

    platform: state
    entity_id: device_tracker.mi_9t
    to: 'home'