Ping sensor not working

Hi, used the code above to ping my router, for some reason I’m not able to get it to run. Keep getting, checked whether the component is there or not and I can find it under components/binary_sensors but still getting this error in the log:
17-05-14 00:35:15 ERROR (MainThread) [homeassistant.loader] Unable to find component binary_sensor.ping
17-05-14 00:35:15 ERROR (MainThread) [homeassistant.bootstrap] Unable to find platform binary_sensor.ping

Any help appreciated… Thanks

What version of Home Assistant are you running?
Have you tried to restart Home Assistant, i have had the issue where some components did not work on first start after a upgrade, but after restarting they worked.

0.55.0 Running on QNAP Nas.