You can change the
device_class of a binary sensor via “Show as” in the UI, but this functionality is not available for (non-binary) sensors. Please consider adding similar functionality for the sensor domain.
Example: I use the min/max/mean helper to create average temperature measurements from multiple temperature sensors. However, the min/max/mean sensor does not inherit a
device_class or icon from the constituent sensors, and the only way to set the appropriate
device_class is through YAML.