Add Support for Fujitsu wireless Air Conditioning control app - FGLair

Been testing a few days with the additions I posted below, and I can confirm the display_temperature is in Fahrenheit. The temperature closely matches the reading of a temperature sensor of a PIR in the same room.
Apparently there is a C/F setting the technician can set on the unit itself (if the model has a display) so it would make sense the API sends back the same value globally as the unit will convert it depending on the setting.

1 Like

Check your path: \config\deps\lib\python3.7\site-packages\pyfujitseu
(pyfujitsā€™Eā€™u)
I was getting the same error when I had \pyfujitsu

Hey guys,

I did some updates to my code to be conform with ClimateEntity (instead the now deprecated ClimateDevice).
Additionally, I tried to step forward to a more ā€žone click installationā€œ. Therefore, I related my python package pyfujitseu.

You will find the code here: https://github.com/xerxes87/pyfujitsu_for_homeassistant

Unfortunately, the package does not install during Home Assistant requirement resolution. I could not fix this issue right now, maybe somebody can help.

For now, you can install the package by just running

pip install pyfujitseu

Using docker you can use the following Dockerfile (make sure to adapt Home Assistant image to your needs, Iā€™m using RPi4.)


FROM homeassistant/raspberrypi4-homeassistant:stable

RUN pip install --upgrade pip && pip install pyfujitseu

Please share your experiences and let me know if the new solution works for you!

2 Likes

Fixed it. For some reason that I canā€™t quite figure out, there is a comparison in the plugin that wonā€™t change to ā€˜heatā€™ if it thinks it is already on ā€˜heatā€™ā€¦and for some reason, it always thinks it is on ā€˜heatā€™?! So I removed that comparison, and now it works.

1 Like

It works! thank you

This looks awesome!!!

Any idea when the vent (louvers) positioning is going to be supported by Hassio? Iā€™m using the code from this plugin in a simple AppDaemon that listens to events, enabling me to send the positioning to my AC, but, having it directly supported by Hassio would be awesome!

I was able to install pyfujitseu into the docker image, but it is worth noting that when I upgraded Home Assistant I had to then reinstall pyfujitseu again.

1 Like

Hi, I am having the same issue. Are you able to post more detail on the change you made?

Perfect it works :slight_smile:

Yeah, this is really annoying.
The only workaround I found is creating the mentioned Dockerfile so that no further manual steps are needed during updates.

Sure. It was in the climate.py file:

     def set_hvac_mode(self, hvac_mode):
        """Set HVAC mode."""
        _LOGGER.debug("FujitsuClimate set_hvac_mode called. self._hvac_mode: %s ; hvac_mode: %s", self._hvac_mode, hvac_mode)
        if(hvac_mode == HVAC_MODE_OFF):
            self._fujitsu_device.turnOff()
        # elif(self._hvac_mode != hvac_mode): # this is the line that I commented out, because the _hvac_mode was always registering as 'heat'; replaced with 'else' below
        else:
            _LOGGER.debug("FujitsuClimate set_hvac_mode elif path called. ")
            self._fujitsu_device.changeOperationMode(hvac_mode)
1 Like

@philwilldo do you think you could incorporate the ambient into your code - I tested what @tomdb_BE suggested it works perfectly and now I have a lovely ambient temperature shown.

image

Hi @qwackers,
This works only for ACs which support this property. Since mine does not, I canā€™t accept pull requests which do not make a case distinction.

Copy that @philwilldo - wondering if there is a way to extract the model from the API? Thanks for answering I have a couple of mods in my code 0.5deg temperature and ambient which I can manage - thatā€™s my limit of coding skills :slight_smile:

@tomdb_BE Would you mind submitting a pull request for this to https://github.com/Mmodarre/pyfujitsu_for_homeassistant/?
Mmodarre isnā€™t very active, but he said he would be willing to check periodically to accept pull requests.

@meichthys Mmodarreā€™s code hasnā€™t been updated for a while and due to the new format of custom components, the file structure is different. So I have created a pull request based on a fork of: https://github.com/xerxes87/pyfujitsu_for_homeassistant

I have also added a check on region (based on the config file) in order to ensure US-based users get the current temperature still in Fahrenheit.

While waiting on approval, the updated code can be pulling directly as follows:

git clone https://github.com/tomdb-BE/pyfujitsu_for_homeassistant --single-branch --branch current-temp-support

(Iā€™m not a dev and still finding my way in github. Feedback on mistakes/missed best practices is appreciated :slight_smile: )

3 Likes

@tomdb_BE Thanks! Good idea to submit the pull request to @philwilldo (xerxes87)'s repo. @philwilldo, would you be willing to accept pull requests and keep pyfujitsu and pyfujitsu_for_homeassistant going?

@tomdb_BE thank you this is fantastic it works perfectly with my A/C running Home Assistant 0.112.4, have you tested with Home Assistant 0.113.x?

@qwackers Youā€™re welcome. Iā€™m running 0.113.0 (only for two days howevers) and all is looking good.

1 Like

Thanks @tomdb_BE also working for me, I did have to change the dependencies by renaming \config\deps\lib\python3.7 to \config\deps\lib\python3.8
image