Netatmo Away_Mode automation with NMap

Hello and thanks for your support.

I’m trying to automate the Away_mode on my Hassio, when my 2 phones are not connected to the home Wi-Fi. I would use the Away_mode for set the “Away mode” on the Netatmo thermostat.
I’ve already wrote the code for this automation, it works when triggered manually from “States” view…But it’s not working automatically when the conditions are fine.
Hereunder the source code I wrote for this needs, may somebody help me?
Thanks in advance…


If its working when triggering manually, we can assume the action section is correct as that does not evaluate the trigger or condition sections.

I don’t see anything wrong with your config but Im not the best at catching these types of errors.

Can you post your config directly to the forum, it makes it much easier to provide edits. See the blue box at the top of each post.

I would add a trigger for each device tracker and a condition for both device trackers. This way it doesn’t matter which is leaving ‘home’ first as either can trigger but both have to be ‘not_home’

Here is an example with two triggers and two conditions.

Finally, confirm that your device trackers are ‘not_home’ when away. If you have other zones setup they could be ‘work’ or ‘school’ instead of ‘not_home’. This is why I went with the method of departing the home zone and then checking to confirm !=home in the link I posted above. (!= is does not equal)

Hello Silvrr,
thanks for your answer! Reading your indication, I think that I didn’t setup the value of “home”. Nmap is correctly showing me if I’m “home”, “In Casa” in italian or “Away”, “Fuori” in italian. You can find here in attachement a sample of my home front-end. Maybe i need to connect the Nmap status with the Hassio Home/away mode?

Thanks in advance for your reply



Go into the developer tools and specifically the states tab.

Find your device tracker entities and check the states. They should be home and not_home if I recall correctly from when I ran nmap. The states shown on the front end sometimes don’t match the actual states you need to use for automatons.

The zones only apply if you are running a GPS based tracker. NMAP is local only to your home network.

You don’t have to use the zone triggers, I was only using the example I linked to show how to include two triggers and conditions. This is used to allow either to trigger the automation but only execute the action when both are gone. This prevents any timing issues with when devices are shown as away.

The state names are correct, herunder the screenshot. Just on front-end are in my language.
So I confirm that the device trackers are working fine, and I’ve no additional zones in my setup.

Now, following your suggestion: If I add a trigger for each phone, may I have loops when only one is disconnected? Anyway unfortunately that’s not working…As the other setup, it’is effective only if triggered. Hereunder the code. I removed also the line: from: ‘home’ leaving just: to: ‘not_home’


Are you waiting for a state change? Ie if you phone is currently not_home the automation will not trigger.

Automation are only evaluated when a state changes. So even though you are currently not_home the automation won’t trigger unless you go from any other state to ‘not_home’.

Last ditch item is to remove the quotes around the entity_id.

Is there anything in your log showing an error on the config?