Expire_after in MQTT sensor has no effect

Sensor configured with next json:

{"name": "Ping", "icon": "mdi:connection", "expire_after": 30, "state_topic": "homeassistant/light/rv/ping/state", "availability_topic": "homeassistant/light/rv/ping/availability", "command_topic": "homeassistant/light/rv/ping/command"}

But after 30s (and several minutes) after last state update it is still available. Is there any problem in configuration or how to debug it?

expire_after is only supported for MQTT sensors and binary_sensors.
Is this a sensor? It shouldn’t have a command_topic , then…

1 Like

yeah, it wasn’t a sensor/binary sensor. I didn’t notice it is for those types only. Thanks!