Device_tracker in configuration.yaml is not working!

Hi,

I have someone in my home that doesn’t want to install the home assistant app on his mobile. But I want to know if someone is at home at a certain time. So in my router my dhcp server will provide a certain static ip address to his phone(192.168.2.150). I want to use a ping request to make sure that he is at home or not. So I use this in my configuration.yaml:
device_tracker:

  • platform: ping
    hosts:
    Mario_Phone: 192.168.2.150

I have restarted home assistant and checked the developer tools and states. This should have “Mario_Phone” now and its state.But I can’t find it. What is wrong?
Any help would be great.

Thanks in advance,
Erik

Ping device trackers are no longer set up via YAML.

Create a Ping integration as described. That will give you a working binary sensor, and a disabled-by-default set of performance sensors as well as a device tracker.

If you need the device tracker as opposed to the binary sensor, go to the Ping integration page, Entities tab, and find and enable the device tracker entity.

This works for me. Thank you for your help.