Utility meter shows no unit in card and doesn't use unit from MQTT sensor

I’ve configure a utility_meter to fetch data from a sensor. This sensor is setup via MQTT using Home Assistant’s “MQTT Discovery” feature*
The sensor reports its unit_of_measurement as “kWh”. The configuration works fine so far and I assume the unit of the utility meter is supposed to be copied from unit_of_measurement of the source-sensor. However, no unit is displayed in the corresponding card.

Screenshot 2021-10-18 at 21-51-59 Home - Home Assistant

Here’s my configuration:

    source: sensor.zahlerstand_fernwarme
    cycle: monthly

    source: sensor.zahlerstand_fernwarme
    cycle: yearly

Not sure if this is relevant, but the unit also correctly shows up in statistics_meta:

homeassistant=# select * from statistics_meta where id in (20,21);
 id |       statistic_id        |  source  | unit_of_measurement | has_mean | has_sum 
 20 | sensor.fernwaerme_yearly  | recorder | kWh                 | f        | t
 21 | sensor.fernwaerme_monthly | recorder | kWh                 | f        | t
(2 rows)

Same goes for the attribute in states:

homeassistant=# select state_id, state, old_state_id, created, attributes from states where entity_id like '%zahlerstand_fern%' order by created desc limit 1;
 state_id |  state  | old_state_id |            created            |                                               attributes                                                
  4842565 | 42701.0 |      4842549 | 2021-10-18 19:29:53.122383+00 | {"unit_of_measurement":"kWh","friendly_name":"Z\u00e4hlerstand Fernw\u00e4rme","device_class":"energy"}
(1 row)

*I’ve written a Python script to read data from a Landis+Gyr T550 (i.e. Siemens UH 50) and create MQTT messages suited for Home Assistant, see https://github.com/peletiah/t550-mqtt

Can you post the attributes of sensor.zahlerstand_fernwarme?

The problem disappeared after tonight’s update. I’m not sure what caused it, I had played a bit with tariff-settings yesterday but eventually settled with the configuration above. I guess those interim changes in settings caused the unit to disappear, until tonights update.