haConfigTemp() unconditionally sets unit_of_meas for the room_temperature sensor to Celsius, even when configured to report temperatures in Fahrenheit — which results in reporting a temperature that is numerically in Fahrenheit but labeled as being in Celsius. If Home Assistant is also configured to default to Fahrenheit, it will do the C->F conversion a second time, displaying the wrong temperature (~160F room temperature!).
This is a one-line fix that conditionally reports the correct unit according to Mitsubishi2MQTT's useFahrenheit setting.
haConfigTemp()
unconditionally setsunit_of_meas
for theroom_temperature
sensor to Celsius, even when configured to report temperatures in Fahrenheit — which results in reporting a temperature that is numerically in Fahrenheit but labeled as being in Celsius. If Home Assistant is also configured to default to Fahrenheit, it will do the C->F conversion a second time, displaying the wrong temperature (~160F room temperature!).This is a one-line fix that conditionally reports the correct unit according to Mitsubishi2MQTT's
useFahrenheit
setting.