Automation not triggered when entering an iBeacon zone

Hi guys,

I defined a zone that is triggered by the HA companion app for iOS when approaching an iBeacon.

The logbook shows that the device enters the zone, but the following automation is not triggered.

zone:

zone:
  - name: Entrance
    latitude: xx.xxxxx
    longitude: xx.xxxxx
    radius: 0.5
    icon: mdi:door-closed

homeassistant:
  customize:
    zone.entrance:
      beacon:
        uuid: d63f828f-d313-4969-bcde-fbb8fd9b382f
        major: 1
        minor: 2

automation:

alias: Etienne/Entrance approaching
description: ""
trigger:
  - platform: device
    device_id: cffbaa9cb857cd5fa4cc87e282baea93
    domain: device_tracker
    entity_id: f0c3e62407228acbb58e2e296c20deb0
    type: enters
    zone: zone.entrance
condition: []
action:
  - type: turn_on
    device_id: 49d1fe688e855414ad8136a7ec3423ca
    entity_id: acbb12ad4f3c00b43032f8ef1b42ee04
    domain: light
mode: single

image

Does anyone has an idea what could be the reason?

Entity IDs are wrong. Try setting this up as a state trigger and service call action.

Can you elaborate on why the entity IDs are wrong and on which state should I trigger?

Entity IDs should look like zone.entrance or device_tracker.etienne_iphone, not a hex string. I’ve seen this problem a few times in recent posts but not worked out the solution yet.

You need to work out the actual entity ID of your phone and its state when in the Entrance zone; and the real entity_id of your light, then do something like:

trigger:
  - platform: state
    entity_id: device_tracker.etienne_iphone
    to: 'entrance'
action:
  - service: light.turn_on
    entity_id: light.entrance