iphonedetect icon indicating copy to clipboard operation
iphonedetect copied to clipboard

iphonedetect works well, but automation cannot be used

Open lhlxx2010 opened this issue 4 years ago • 2 comments

Iphonedetect works well, but when i want to set automation. I found that i can not find entity(my iphone) in Equipment. I can only find entity(my iphone) in state. Is something i missed? eb600dea10c1a4b75e88aacc6f3bbfa 4e7db32ad2be2b586a3f7c1ea77913d

lhlxx2010 avatar Mar 23 '22 11:03 lhlxx2010

Hi @lhlxx2010

device_tracker don't have a Device https://github.com/home-assistant/core/pull/63328 So, as you've shown the state is needed to act as trigger in automations. You can use a template with trigger.to_state.state == "home" (or "not_home") for condition and/or action

Maybe a Device Trigger can be added, a device is needed though...

mudape avatar Mar 23 '22 22:03 mudape

Hi @lhlxx2010 Can you please try the 2.0.0 pre-release and see if that enables what you are asking for?

For now only the consider home time can be configured once the entity is set up. You do that in the Configuration -> Devices & Services page in HASS. Here you also can add (click + and search for iphone device tracker) and delete tracked devices.

After first import you can delete config in configuration.yaml and also remove devices from known_devices.yaml (if not used by other integrations). Check that Person entity is using the wanted device_tracker as name might have changed.

As the integration don't add entities until MAC is found tracked devices needs to be home before being added the first time. Thanks!

I haven't updated the readme yet, please report any findings or ideas :)

mudape avatar Apr 15 '22 11:04 mudape