Ping configuration in 2023.12

Hi everyone,

can somebody please help me figure out this so I can upgrade.

It’s my understanding that I can do this:

binary_sensor:
  - platform: ping
    host: 192.168.0.1
    name: ping_sensor
    scan_interval: 30

By using the ping integration UI and then have an automation like this:

alias: "ping scan_interval"
description: ""
trigger:
  - platform: time_pattern
    seconds: /30
condition: []
action:
  - service: homeassistant.update_entity
    target:
      entity_id:
        - binary_sensor.ping_sensor
    data: {}
mode: single

But what about this:

device_tracker:
  - platform: ping
    scan_interval: 60
    count: 5
    consider_home: 180
    hosts:
      ping_phone: 10.0.0.100

Can I use this automation?

alias: "ping scan_interval 60 seconds"
description: ""
trigger:
  - platform: time_pattern
    minutes: /1
condition: []
action:
  - service: homeassistant.update_entity
    target:
      entity_id:
        - device_tracker.ping_phone
    data: {}
mode: single

And what about consider_home? I can’t figure that out.

Thanks!