Service logbook.log doesn't work with sensors?

Hi!

I would like generate log-like messages about electricity spot prices – every day I fetch data about electricity prices (which change every hour in my country) for next day. Once I get them, I iterate over them and generate warning message about low or very high prices (in those period I either force charge home batteries or avoid charging at all).

I thought that I can use NodeRed “Service Node” and “logbook.log” service with entity_id set to sensor with electricity spot prices. But it doesn’t work and later I found some comment here on forum, that it is not possible to bind logs and sensors in HA.

How can I solve it please? Should I use some other way how to generate text messages about some states, or do I need to attach logs with some other entity than sensor (which one?).

Thanks!

Use an automation.

Can you point me to some example please?