MQTT sensor to Logbook

I want to be able to write to Logbook all events from a custom MQTT sensor called sensor.asterisk_call_status.
By default it doesn’t write anything, so I tried it manually as you can see bellow, but it doesn’t write it to that specific sensor. If I look at the logbook, I can see the record, but it I can’t click on it and it’s not associated with my sensor.

service: logbook.log
data:
  message: 2test
  name: sensor.asterisk_call_status

Is there another alternative on how to get the events on my logbook?

Edit: I don’t know if it helps, but you can find my project here which is a service that sends events on MQTT server.

Hey I have the same problem, did u find a solution for your problem?

I didn’t exactly solved the problem, but after updating to the newest version of Home Assistant, the problem was fixed.
You might need to have MQTT Autodiscovery enabled to have the logs, but I am not sure.