Yellow: How to read the CM4 temp?

Just starting with my new Yellow (used to use a VM w/ HAOS). Pretty cool device.
One of the first things that occurred to me is - how do I monitor its own temperature? The heat sink does get warmish even under minimal load, which immediately makes me want to have a HA entity holding the env info of the CM4 - primarily, temperature.
Any pointers as to how to get that?

Answering my own question, which I’m leaving for posterity. Taken from

  - platform: command_line
    name: CPU Temperature
    command: "cat /sys/class/thermal/thermal_zone0/temp"
    unit_of_measurement: "°C"
    value_template: "{{ value | multiply(0.001) | round(1) }}"
1 Like