Device Is home not working

My automation has a condition so it only runs if my phone is home, but the test fails as it gets the case of “home” mixed up.

What did I do wrong?

I created the automation through the GUI with this simple condition:

In Yaml:

condition:
device_id: …
domain: device_tracker
entity_id: …
type: is_home

When I check the Trace I see the condition failed as device was “home”, expected “Home”:

Edit: fixed typo in my post. The actual yaml does not have the typo.

Typo

domain: devixe_tracker??

1 Like

I would avoid device triggers and use state triggers, but I do not think that is the problem per se.

Check the developer tools what the actual state of the device tracker is. If it is Home, then either the device tracker is badly implemented (higly unlikely) or you yourself created a zone called Home, which is advised against.

If you must have a self made zone at the same place where the home zone is, then use a state trigger, and check for both home and Home.

3 Likes

I agree with @Edwin_D :100: . I focused on the typo vs the method.

1 Like

That was my mistake, tried cut&paste but it was a mess so manually typed it and made a typo.

My bad too, saw the typo and skimmed too fast through your post. Edwin’s advice is a great place to start!

1 Like

I think it’s just what you said, I created a location.

1 Like