[Solved]As Edwin said, I should use the real states in developer tools.
I set up an automation to send me an alert when a vital device in my network is offline. However, I notice that the automation never trigger even though the device has been offline for several days.
I finally realize that the states in device tracker are not consistent. It displays as ‘home’ and ‘away’ in history and ‘home’ and ‘not_home’ in entities list. Please see the screenshot below.
I use away as trigger. no wonder it never trigger. I hope they could be consistent to avoid this kind of problem as encounter. Thanks.