Windows 11 by default doesn’t allow pings from computers that are outside the subnet mask.
Lets say that you have a computer with Windows 11 that runs on 192.168.0.1 and the Home Assistant server that its on 192.168.100.2. Because the subnet mask is different, Windows 11 wont allow any communication between the two systems.
Thats why when you are trying to setup Wake on Lan in Home Assistant the computer might turn on but the status of the computer is not updated in Home Assistant.
Thats just an example with WOL, but there might be different scenarios where you are trying to see if the computer is on or off
In this short article i will explain to you how you can Allow Home Assistant to ping Windows 11.
First you need to open Windows Defender Firewall and set a New Rule.
The rule type needs to be setup as Custom then hit Next.
Now apply this rule for all programs or you can specify just a few programs that can acces it (lets say the Home Assistant Browser App)
The Protocol Type set it to ICMPv4 and click on Customize. Limit the ICMP type to only Echo Request. After that click ok and then Next.
In the Scope Step, you can specify the IP address that is rule is applying to or you can leave it as Any IP, but i recommend to define the servers IP.
Click on Allow the connection and Next afterwards.
You can limit the rule to different Profiles or just leave them all selected only if in the previous step you’ve allowed a specific IP, if not then deselect Public networks from the list.
Now give it a name and click Finish
Now you are able to ping Windows 11 from Home Assistant and the device status will get updated.