Utility Meter - jumps when restarting?

I notice when I restart HomeAssistant the Utility Meters seem to jump, presumably because initially the sensors from MQTT are “unknown” which I guess is zero; then populate their values.

This means if (for example) I have a daily rain gauge sensor if we got 0.25 inch and I restart HomeAssistant it suddenly reads 0.5 inches for the day…not good.

Is there any way too fix this?

Retain your mqtt sensor states in the broker.

Is that something I can set up with the YAML of my sensors, or is that something that someone has to change in the RTL433 addon?

You have to get whatever is sending the mqtt messages to send them with the retained flag set.

ugh, I guess I would have to submit a feature request then.

Is there some other kind of sensor that would correctly handle the differences, or ignore when it is zero?

I think I may have found where it is sent, and if I understand the -r means it already has retain set.

  echo $line | /usr/bin/mosquitto_pub -h $MQTT_HOST -u $MQTT_USER -P $MQTT_PASS -i RTL_433 -r -l -t $MQTT_PATH

Is there a possibility the “unknown” value is happening if HomeAssistant loads faster than the addons initialize or something?

I suppose it is possible that the utility meter platform could be loaded before the mqtt platform.

is there a way to delay it loading for a bit (say 90 seconds) to give everything else a better chance at initializing properly first?

Not that I am aware of.