Using Ping Binary Sensor to monitor multiple IP's

Works great for a single IP but I’m trying to monitor 2 IP’s.

Just repeating the yaml entry with different IP does not work as only last entry is taken as valid.

What is the proper way to monitor multiple IP’s.
Not doing anything fancy, just an automation to send email when IP is down.

How have you implemented the sensors? This is what I use (in configuration.yaml) and works fine:

binary_sensor:
# ============ TV-RUM ============= 
  - platform: ping
    host: 192.168.0.58
    name: "T-Philips TV"
    count: 2
    scan_interval: 30
# ============ G-RUM ==============
  - platform: ping
    host: 192.168.0.39
    name: "G-Philips TV"
    count: 2
    scan_interval: 30
1 Like

Is your “name” the actual hostname?
I tried with a generic name but no luck.
Other than that my entry is pretty well like yours.

Just post what you have instead of describing what you think it is.

No it’s not, just a generic name. As @Hellis81 said, post what you have.

> binary_sensor:
>   - platform: ping
>     host: 192.168.2.59
> 
> binary_sensor:
>   - platform: ping
>     host: 192.168.2.251

only last entry shows in HA.

tried:

binary_sensor:
  - platform: ping
    host: 192.168.2.59
    name: "Cam"

binary_sensor:
  - platform: ping
    host: 192.168.2.251
    name: "Shed"

nothing showed, hence the question on wether name has to be actual hostname.

sorry about the formatting error.

Look at the difference. You only have to define:

binary_sensor:

once :slight_smile:

Duh… Thank you.

Edit: Didn’t like just adding the name:

5 minute refresh is ok so i just left it as basic. All good. Thanks again.