Closed coxtor closed 5 years ago
This is normal.
Device tracker platforms work directly with the device tracker component and do not call the device_tracker.see
service. Consequently, when they "see" a device, the service is not fired, and hence you won't see a call_service event.
If you want an automation to fire when a device is seen/updated, then you should probably be using a state trigger.
Thank you
Home Assistant release with the issue:
Last working Home Assistant release (if known):
Operating environment (Hass.io/Docker/Windows/etc.): Docker
Component/platform: platform: device_tracker components. fritz, nmap and possibly other device tracker platforms
Description of problem: I have an automation that should be executed every time a device is “seen” . However, the automation is never executed. When manually firing the device_tracker.see service with mock data in the home assitant interface the automation works fine.
Otherwise the device tracker works well and reliable, for presence detection.
No errors occur.
Furthermore when analyzing the home assistant.db it shows that the service is never logged, except, when called manually. However, the service is registered multiple times.
Excerpt of the db:
Service registered entry: "98503" "service_registered" "{""domain"": ""device_tracker"", ""service"": ""see""}" "LOCAL" "2019-05-03 05:32:43.082224" "2019-05-03 05:33:02.843096" "fcde4b5ce5e1462383bdbbd56d1809ca"
Manually triggered event in web-ui
Mock data: {"dev_id":"device", "location_name":"home"}
Corresponding database entry: "226942" "call_service" "{""domain"": ""device_tracker"", ""service"": ""see"", ""service_data"": {""dev_id"": ""redmi_note_5"", ""location_name"": ""home""}}" "LOCAL" "2019-05-09 12:13:10.476427" "2019-05-09 12:13:10.497045" "a5ebf98b12824269a6a4f0318c97a223" "ef49cf62bc7b44f0ae88b9bf8c3ad62c"
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
This behavior has been verified on a second local home assistant instance using the nmap and fritz component.
As a further remark: Testing the call service event using the identical automation with a different platform
works flawlessly.