I am still a newbie in HA.
Is it possible to define “device_tracker” entity manually in config?
OK, in my practice usually device_trackers are added automatically (ASUSWRT, Life360), but I wonder is it possible to declare them manually - for “ping” for example.
I specified this tracker in config.yaml (from here - https://www.home-assistant.io/integrations/ping/#presence-detection ):
device_tracker:
- platform: ping
hosts:
hostname: test_tracker
But no entity was added to HA, and no errors are present in the log.
I guess you should put the ip of the device that you wanna track to hostname
Hostname needs to be the ip or the hostname of the device you want to track, as stated in the docs you linked.
First it was like this:
hostname: test_tracker.com
I specified a fictional website.
Let’s assume that test_tracker
is a hostname of fictional PC - which is not available now.
I believed that in both of these cases (website, PC) the device_tracker is supposed to be created.
sjee
December 5, 2020, 1:18pm
5
It’s impossible to resolve the IP from a fictional domain.
It’s the same, howto resolve the IP from a fictional hostname
Well, I believed that the entity anyway must be created and equal to something like “not_home” )))
Also there is no any errors in the log…
Of course, specifying a valid IP creates a device_tracker entity.
sjee
December 5, 2020, 1:35pm
7
Ofcourse… please set the topic to solved
Marked your post as a solution.
My gratitude to everyone who helped me in this thread!
1 Like