Problem with switch

Hello,

First of all, I’m very new to Home Assistant and just try to understand the basics for now.

In the configuration.yaml I setup to use locative:

device_tracker:
- platform: locative

In the known_devices I have:

760db0a49bbf124e:
  hide_if_away: false
  mac:
  name: Erik
  picture:
  track: true
  vendor:

When I enter/leave a certain area I can see the Icon on the webpage change from HOME to AWAY so I know that the detection of my phone works ok.

I use a WeMo switch named “Other” to switch on/off when I’m home or not:

This is not working:

- alias: 'Iemand Thuis'
  hide_entity: True
  trigger:
     platform: state
     entity_id: device_tracker.Erik
     state: 'home'
  action:
     service: switch.turn_on
     entity_id: switch.Other

When I program a boolean it works:

- alias: 'ON'
  hide_entity: True
  trigger:
    platform: state
    entity_id: input_boolean.erik_home
    state: 'on'
   action:
    service: switch.turn_on
    entity_id: switch.Other

Any idea what the problem is with the locative setup?

Erik.

Double check that indentation, looks off to me (but often hard to tell on here :slight_smile: ). Plus also, I had a strange issue a few days ago where I found that switch.turn_on wasn’t working but homeassistant.turn_on was. I’ve not gone back to prove it was definitely an issue, but try that as a fix perhaps? Here’s an automation rule for me that works just fine:

 - alias: "Laundry fan off"
  trigger:
    platform: numeric_state
    entity_id: sensor.rm_a1_humidity
    below: 54
  action:
    service: homeassistant.turn_off
    entity_id: switch.laundry_fan

Hi @EchoWisky

I’m sorry for the offtopic question, but I’m trying to get locative to work, and the testing is working.
But it isn’t updating my location otherwise.

Did you have to add geofences in the locative app to get it to work?

Regarding your question, should your devicename (Erik) be erik?
Otherwise I would try looking for the zone-trigger.

Hi,

Yes, add a Geofence and put the HTTP settings both ON.

Erik