Ping (ICMP) Binary sensor

The ping binary sensor platform allows you to use ping to send ICMP echo requests. This way you can check if a given host is online and determine the round trip times from your Home Assistant instance to that system.


To use this sensor in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
  - platform: ping

Configuration Variables


(string)(Required)The IP address or hostname of the system you want to track.


(integer)(Optional)Number of packets to send.

Default value: 5


(string)(Optional)Let you overwrite the name of the device.

Default value: Ping Binary sensor

The sensor exposes the different round trip times values measured by ping as attributes:

  • round trip time mdev
  • round trip time avg
  • round trip time min
  • round trip time max

The default polling interval is 5 minutes. As many components based on the entity class, it is possible to overwrite this scan interval by specifying a scan_interval configuration key (value in seconds). In the example below we setup the ping binary sensor to poll the devices every 30 seconds.

# Example configuration.yaml entry to ping host with 2 packets every 30 seconds.
  - platform: ping
    count: 2
    scan_interval: 30

When run on Windows systems, the round trip time attributes are rounded to the nearest millisecond and the mdev value is unavailable.