simbaja / ha_gehome

GE Home Appliances (SmartHQ) for Home Assistant
MIT License
343 stars 80 forks source link

Fisher & Paykel oven not showing celsius correctly #248

Open kaygang opened 7 months ago

kaygang commented 7 months ago

Hi there, I have added my Fisher & Paykel smart oven via the integration and it's working as expected. However, the temperature numbers on the Home Assistant control card show as Fahrenheit even though it is using the Celsius marker/format. I need the numbers in Celsius basically. Is there any way to fix this? Oddly enough, the Raw Temperature sensor shows the correct temperature in Celsius!

image image
simbaja commented 6 months ago

It might be that the oven always returns measurements in Fahrenheit (similar to other devices). If you modify the temperature_unit property in the ge_oven.py file to comment out the if logic (i.e. always return UnitOfTemperature.Fahrenheit), does it all still work for you (including setting cook temp and mode)?

kaygang commented 6 months ago

Thanks heaps for the reply, this is what I changed to in that file, but it didn't seem to make any difference.

@property def temperature_unit(self): measurement_system = self.appliance.get_erd_value(ErdCode.TEMPERATURE_UNIT) if measurement_system == ErdMeasurementUnits.METRIC: return UnitOfTemperature.CELSIUS else: return UnitOfTemperature.CELSIUS

return UnitOfTemperature.FAHRENHEIT

simbaja commented 6 months ago

If you comment out everything other than the last line (i.e. reverse what you've done above), does it all work correctly?

parndt commented 6 months ago

@simbaja that workaround works well for me for setting/reading current temperature as I have the same issue with ULV316452

    @property
    def temperature_unit(self):
        # measurement_system = self.appliance.get_erd_value(ErdCode.TEMPERATURE_UNIT)
        # if measurement_system == ErdMeasurementUnits.METRIC:
        #       return TEMP_CELSIUS
        return TEMP_FAHRENHEIT

However, the other metrics are suffering conversion as you can see in the screenshot:

image