Dealing with sensors with network dropouts

Hi,
I have a Shelly EM sensor in a weak coverage area for my air conditioner. I have a sensor based on a value template that measures the watts of consumption. I automate activities whether my air conditioner is running or not. What I am finding is if the wifi drops out Home Assistant keeps the last measurement. So, even if the air conditioner is not running the sensor has a value hence HA thinks the air conditioner is operational due to the wifi dropping out.

I’ve tried monitoring the switch so if it goes unavailable it assigns an arbitrary number so I know it has lost connection. It seems like even when the wifi is not connected it keeps its previous state, and never goes ‘unavailable’. Is there a way I can say if HA hasn’t got an update for the last 120 seconds from shelly it forces it to ‘unavailable’?


mr_slim_watts_error:
       friendly_name: 'Mr Slim Watts Error'
       value_template: >
         {% if states('switch.mr_slim_current_switch') != 'unavailable' %}
           {{ states.sensor.mrslim_watts.state }}
         {% else %}
           {{ '-99' }}
         {% endif %}

2.4 GHz Wi-Fi is especially prone to interference. In fact, at the system I support at work, we provide minimal support for it. Do you have any way of increasing coverage in that area? I wish there were 5 GHz Wi-Fi Smart Home components available.