Alert when Tasmota and MQTT devices go offline/online

Hello
I am looking to create an alert for when my Tasmota and MQTT-connected devices go offline. In my configuration for the MQTT devices I added the availability topic in the configuration of each entity but I don’t seem to be able to see that anywhere. I can create an automation to alert when the device becomes “unavailable” which I suspect is the way that devices are reported when they’re offline but cannot see anything for when they are online to alert accordingly.

I’m also unable to see the availability status in the Tasmota integration even though I can see it in the MQTT topic as part of the json that I suspect the integration is parsing.

Any ideas?

use a ping sensor?

# Example configuration.yaml entry to ping host 192.168.0.1 with 2 packets every 30 seconds.
binary_sensor:
  - platform: ping
    host: 192.168.0.1
    scan_interval: 30 
    count: 2

Thanks @aceindy but why would you do that when HASS is supposed supposedly monitoring device availability?

Something like that:

trigger:
  platform: state
  entity_id:
    - sensor.your_entity
  to: unavailable

Thank you @francisp Is there an “available” equivalent for when it is back online?

No, but you can use not unavailable

Thank you. I didn’t know that was an option :slight_smile: