Template sensore with expirationdate doubled in home assistent

Hi,

I have the following template sensor that is getting updated by a key_collector:

Problem is that in home assistant this entity is double:

One is from the ESP Home integration, the other from the MQTT.

Can i somehow prevent this ?

Remove one or the other from your esp device’s configuration.

Ok, But I only have one config in there with the template sensor. The expire_after somehow added the MQTT one

You have 2 in there. The MQTT section is providing sensor discovery.