How can I access esphome project name and version information to output as text sensor

Hello community,
I recently added project information to my YAML configuration, like this:

esphome:
  name: pumpmon
  project:
    name: "xyz.pumpmon"
    version: "2.0.3"
  comment: Pumpstation Monitor

This information is currently visible in the logger output.
But would it be possible to use project name and version in a text sensor or in lambda to have it displayed in home assistant?

Thank you for any help.
Nob

define it as substitutions

then you can do your header keys and a sensor
the sensor should be able to return a lambda value right, wich resolves via the substitution ?

Thank you very much, maxh !
It is working fine.

Nob