Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Celsius air conditioners will not set temperature #19

Closed
amaisano opened this issue Jun 7, 2023 · 8 comments
Closed

Celsius air conditioners will not set temperature #19

amaisano opened this issue Jun 7, 2023 · 8 comments

Comments

@amaisano
Copy link
Contributor

amaisano commented Jun 7, 2023

def set_temperature(cls, temperature: int) -> List[Component]:
# This is a restriction set by Frigidaire
if temperature < 60 or temperature > 90:
raise FrigidaireException("Temperature must be between 60 and 90 degrees, inclusive")

Why is this hard coded to Fahrenheit? My AC units are all set (individual settings in the 2.0 app, and in the profile settings of the 3.0 2023 app) to show as Celsius.

(Yes, there are many people in the US that prefer Celsius, instead of Fahrenheit)

Home assistant is also set to Celsius.

When I try to request 24° C, I get this error:

Temperature must be between 60 and 90 degrees, inclusive

Which makes no sense. I think we need a check for units, but I'm having a hard time determining if we can get that info reliably from the API. If not, maybe a user variable setting?

@amaisano
Copy link
Contributor Author

amaisano commented Jun 7, 2023

FYI here is the logic in the supplicant HA component, homebridge-frigidaire:

    @property
    def min_temp(self):
        """Return the minimum temperature."""
        if self.temperature_unit == TEMP_FAHRENHEIT:
            return 60

        return 16

    @property
    def max_temp(self):
        """Return the maximum temperature."""
        if self.temperature_unit == TEMP_FAHRENHEIT:
            return 90

        return 32

@amaisano
Copy link
Contributor Author

amaisano commented Jun 7, 2023

In the meantime, I am currently hacking the homebridge-frigidaire component by adding this if statement to the set_temperature function in order to convert to F°:

        if self.temperature_unit == TEMP_CELSIUS:
          temperature = int(math.floor((temperature*9/5)+32))

@amaisano
Copy link
Contributor Author

amaisano commented Sep 8, 2023

Bump

@rothn
Copy link
Contributor

rothn commented Jan 28, 2024

#22 would make this possible to specify manually as a user:

fr_api.execute_action(my_appliance, [
        frigidaire.Component(Setting.TARGET_TEMPERATURE_C, temperature)
])

A cleaner way to address this upstream might be to make set_temperature() take an Optional[Unit] that defaults to fahrenheit (to preserve backward compatibility, e.g. for the homeassistant integration).

@amaisano
Copy link
Contributor Author

bump

@amaisano
Copy link
Contributor Author

why is everything hardcoded in F ???

@rothn
Copy link
Contributor

rothn commented Jun 1, 2024

The maintainers are most likely from North America-- I know I am-- and too busy with other things in our personal lives to add functionality that doesn't benefit us (again, I know I am). It should be a relatively simple change, as detailed by my comments above.

@bm1549
Copy link
Owner

bm1549 commented Jun 29, 2024

Closed via #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants