Nmap automation

I want to create an automation that checks if a device with certain ip is available in my network trough nmap or similar whenever my front door is opened or closed. Googled it but can’t find a working nmap flow. Any help?

I use ping https://www.home-assistant.io/integrations/ping/
I have automatons based on ping binary sensors.
I have my kids computers on smart switches, so when they turn off their computers by shutting them down after the lights go off I do a check over 10 mins to ensure it is shutdown, then I turn the outlet off.

- id: '1598286523419'
  alias: eloAbe Power Off
  description: Turn off power to Abe's computer if off and light off
  trigger:
  - entity_id: light.leviton_light_abraham
    for: '660'
    from: 'on'
    platform: state
    to: 'off'
  condition:
  - after: '19:00'
    before: 06:00
    condition: time
  - condition: state
    entity_id: binary_sensor.ping_eloabe
    state: 'off'
  action:
  - device_id: b4deca27f8b647b18911babdcfd0f50a
    domain: switch
    entity_id: switch.wemo_mini_abe
    type: turn_off
  mode: single

Thanks for the answer.

I tried ping configure on node red and that did the trick. Problem now is I’m not getting how can I switch home/not_home on a device_tracker