How to test if a device is unresponsive?

I have an Aqara T1 valve controller that occasionally becomes unresponsive. I can see in the device “Actions” that the state is unknown and sometimes unavailable. Also, in Developer Tools I ran an action and got the “Device did not respond” error shown below.

How can I automate testing to determine if this device is unresponsive or not?

-Thanks

the device will be responsive when unknown. When it goes unavailable, you’ll likely get that error.

You can make an automation notify you when the device goes unavailable. A simple state trigger looking for the state “unavailable” will work.

Thanks! I was trying to make a sensor template but this seems much more straightforward.


trigger: state
entity_id:
  - switch.aqara_t1_valve_controller_2
to:
  - unavailable