Aquara Leak Sensor

Hello,
how can i make a alert, when this device goes offline?
i dont wanna have water again in the basement.
THX

check for unavailable

platform: state
entity_id: sensor.el_maaler
to: unavailable