Some warnings after update...what to improve?

After latest update I am seeing some warnings in the log during startup. I think most are related to things that haven’t fully initialized, but I am wondering if there is something I should be doing differently. My log has crazy numbers of similar warnings from all the Z-Wave things that aren’t yet connected at initial startup.

For example, this is unavailable because the thermostat is Z-Wave and until the Z-Wave network is initialized enough to reach the thermostat it can’t get a value. I’m just filtering once in a while I get impossible readings (like 300%) that throw off my other automation so I’m discarding those.

2021-10-30 09:52:13 WARNING (MainThread) [homeassistant.helpers.template] Template warning: 'float' got invalid input 'unavailable' when rendering template '{% if states('sensor.upstairs_thermostat_relative_humidity') | float >= 0 and states('sensor.upstairs_thermostat_relative_humidity') | float <= 100 %}
  {{ states('sensor.upstairs_thermostat_relative_humidity') }}
{% else %}
  {{ states('sensor.upstairs_thermostat_relative_humidity_corrected') }}
{% endif %}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2021.12

I also see some new warnings about temperature sensors which I have a huge number of…is there an easy way to get a list of every YAML file in every package that I need to check without manually hunting for each one?

e converted to °F. Temperature conversion for entities without correct device_class is deprecated and will be removed from Home Assistant Core 2022.3. Please update your configuration if device_class is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2021-10-30 09:52:04 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.outside_rear_temperature (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) with device_class None reports a temperature in °C which will be converted to °F. Temperature conversion for entities without correct device_class is deprecated and will be removed from Home Assistant Core 2022.3. Please update your configuration if device_class is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2021-10-30 09:52:04 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.attic_temperature (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) with device_class None reports a temperature in °C which will be converted to °F. Temperature conversion for entities without correct device_class is deprecated and will be removed from Home Assistant Core 2022.3. Please update your configuration if device_class is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2021-10-30 09:52:04 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.shed_temperature (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) with device_class None reports a temperature in °C which will be converted to °F. Temperature conversion for entities without correct device_class is deprecated and will be removed from Home Assistant Core 2022.3. Please update your configuration if device_class is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22
2021-10-30 09:52:04 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.master_closet_temperature (<class 'homeassistant.components.mqtt.sensor.MqttSensor'>) with device_class None reports a temperature in °C which will be converted to °F. Temperature conversion for entities without correct device_class is deprecated and will be removed from Home Assistant Core 2022.3. Please update your configuration if device_class is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+mqtt%22

Have a read of this:

Ok, but SHOULD this be done? Like I don’t even know what a reasonable default would be when the input data is invalid or missing. Its complaining about most of these things when the inputs are still being initialized by other things like Z-Wave, MQTT, etc.

And to the other point, is there a way to track which file and line all these warnings (I have an insane number, pages scrolling on my screen) are at so I don’t have to use trial and error to figure out which line in which subfolder which package-directory it is angry about? Some I can make educated guesses but that still leaves a lot of similar things to squint at to tell which is its complaint.

Yes, otherwise home assistant would not be warning you.

Previously it would return 0, so you could copy that and use 0 as the default. Or a better choice would be none which will produce the ‘unavailable’ state so you know when there is an issue with your template.

Each of the warning lists the template with the fault. If that does not give you a big enough hint as to where in your config it is you can always use a text search.

Can the default be another template?

Looks like many of my cases where it complains it looks like I already wrapped in an if-check so “if the sensor is unavailable or out of range, return the previous value known” else “return a computed value”