Hassio Device Tracking, hide_if_away not working

I have device tracking (based on Unifi controller) working fine. However, hide_if_away: true does not seem to work properly. As you can see in the picture below, people who are away are still shown in a badge.

Of course I can create a (conditional) card, but I would really like to have it in badges.

Another option is that HOME will turn into green and AWAY into red

The funny thing is that if I go to the States UI interface, a badge is hidden if it is not home (away). So there is code available.