Closed picnicbob closed 3 weeks ago
I got the same error
Same
Here's my bandaid fix to work around it:
on my HA server, I edited /config/custom_components/fglair_heatpump_controller/climate.py
by commenting out lines 418 through 420:
probably could do a try/except but I didn't bother since I don't care about displaying the current temp.
Then in def swing_mode()
around line 490, i added a hard code to set the swing mode and an early return to avoid going into more code that crashes:
Of course this is a very crude bandaid fix but it got my devices to load correctly on my dashboard and i can set the mode and temp which is all I need.
Thank you guys I've to analize it better. I suppose it's caused by some limitations related by AC device.
Par me doing something wrong in updating the integration the problem is still there for 0.3.16:
2024-08-03 00:15:29.158 ERROR (MainThread) [homeassistant.components.climate] Error adding entity None for domain climate with platform fglair_heatpump_controller
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 816, in _async_add_entity
capabilities=entity.capability_attributes,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 318, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 511, in capability_attributes
data[ATTR_SWING_MODES] = self.swing_modes
^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 318, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 533, in swing_modes
vert_pos_list: list[str] = self._fujitsu_device.vane_vertical_positions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 219, in vane_vertical_positions
array = np.arange(1, self.get_af_vertical_num_dir()["value"] + 1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value
Edit: If there is something I can do to help you diagnose, please don't hesitate to let me know by the way. I have 3 aircons in the application but it's already failing on the first one it encounters as none are added.
Thank you guys I've to analize it better. I suppose it's caused by some limitations related by AC device.
I’m fairly certain the model I have does not provide the room temp.
The overarching issue is that different models don't support all properties and the underlying API library isn't returning None
correctly in some cases when the value isn't present in the JSON received from the API request.
For my case it was missing display temp and swing mode, for others it might be different.
I do not have a display on any of the 3 aircons. So I don't expect any of them to return the room temperature. Only one has horizontal swing (they all have vertical).
There doesn't happen to be an API endpoint to fetch a devices' capabilities?
Ok thank you for these interesting hints! So can you confirm that in the official FGLair app, for your AC, there aren't room temperature or swing mode?
Not that I can see
Same issue for me
2024-08-07 12:51:12.077 DEBUG (MainThread) [custom_components.fglair_heatpump_controller] Finished fetching fglair_heatpump_controller data in 0.477 seconds (success: True) 2024-08-07 12:51:12.078 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate async_setup_entry called 2024-08-07 12:51:12.557 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] async_setup_entry called with AC000W002905713 - eu - token.txt - 2.0
2024-08-07 12:51:12.558 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate init called for dsn: AC000W002905713 2024-08-07 12:51:12.559 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] Update FujitsuClimate device by async_update 2024-08-07 12:51:13.201 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate return device name [AC-UTY-a0cc2bf20410] 2024-08-07 12:51:13.201 ERROR (MainThread) [homeassistant.components.climate] fglair_heatpump_controller: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update await self.async_update() File "/config/custom_components/fglair_heatpump_controller/climate.py", line 414, in async_update await self._fujitsu_device.async_get_display_temperature_degree() File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 331, in async_get_display_temperature_degree display_temperature_value = self._display_temperature["value"]KeyError: 'value'
Same issue for me, following. Here are my logs:
Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:72
integration: Climate (documentation, issues)
First occurred: 11:14:41 AM (2 occurrences)
Last logged: 11:20:53 AM
fglair_heatpump_controller: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1296, in async_device_update
await self.async_update()
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 414, in async_update
await self._fujitsu_device.async_get_display_temperature_degree()
File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 331, in async_get_display_temperature_degree
display_temperature_value = self._display_temperature["value"]
~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'
Here's my bandaid fix to work around it:
on my HA server, I edited
/config/custom_components/fglair_heatpump_controller/climate.py
by commenting out lines 418 through 420:probably could do a try/except but I didn't bother since I don't care about displaying the current temp.
Then in
def swing_mode()
around line 490, i added a hard code to set the swing mode and an early return to avoid going into more code that crashes:Of course this is a very crude bandaid fix but it got my devices to load correctly on my dashboard and i can set the mode and temp which is all I need.
I ve trying your bandaid fix , doesn't work for me :(
What is the error log saying?
What is the error log saying?
2024-08-08` 09:11:18.594 DEBUG (MainThread) [custom_components.fglair_heatpump_controller] Finished fetching fglair_heatpump_controller data in 0.493 seconds (success: True)
2024-08-08 09:11:18.595 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate async_setup_entry called
2024-08-08 09:11:19.055 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] async_setup_entry called with AC000W002905713 - eu - token.txt - 2.0
2024-08-08 09:11:19.056 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate init called for dsn: AC000W002905713
2024-08-08 09:11:19.056 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] Update FujitsuClimate device by async_update
2024-08-08 09:11:19.694 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate return device name [AC-UTY-a0cc2bf20410]
2024-08-08 09:11:19.695 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] Last refreshed update date [2024-08-08 07:09:50+00:00]
2024-08-08 09:11:19.700 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate device [AC-UTY-a0cc2bf20410] return fan_mode [auto]
2024-08-08 09:11:19.701 DEBUG (MainThread) [custom_components.fglair_heatpump_controller.climate] FujitsuClimate device [AC-UTY-a0cc2bf20410] return current operation_mode [0] ; operation_mode_desc [off] ; translated into [off]
2024-08-08 09:11:19.701 ERROR (MainThread) [homeassistant.components.climate] fglair_heatpump_controller: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
await self.async_update()
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 422, in async_update
self._swing_modes = self.swing_modes
^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 526, in swing_modes
vert_pos_list: list[str] = self._fujitsu_device.vane_vertical_positions()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 221, in vane_vertical_positions
array = np.arange(1, self.get_af_vertical_num_dir()["value"] + 1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'
Log recovered after applying your bandaid fix
I have the same issue here, also the same log before, and same log as @totorb2x after the workaround.
I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:
Restart HA, now you will get your AC entities.
I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:
Restart HA, now you will get your AC entities.
Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.
I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:
Restart HA, now you will get your AC entities.
Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.
You can, just add climate card and you will have all relevant functionality.
I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but:
Restart HA, now you will get your AC entities.
Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.
You can, just add climate card and you will have all relevant functionality.
I just tried. I can only see the status of the air conditioner. Maybe I'm doing it wrong?
Edit: Nevermind, that s work :)
Have you tried to use the built in climate card? I did, and I have an AC functionality
On Sun, 18 Aug 2024 at 18:41 totorb2x @.***> wrote:
I have found a workaround for the 2nd issue, and it seems to work (execpt: seeing current temperature & swing modes). in climate.py file, go to def swing_modes (line 526) Delete anything but: [image: Screenshot 2024-08-18 at 18 06 21] https://private-user-images.githubusercontent.com/16595405/358915722-965bbbf3-52ee-4b9b-8855-53433f326284.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM5OTUwNDAsIm5iZiI6MTcyMzk5NDc0MCwicGF0aCI6Ii8xNjU5NTQwNS8zNTg5MTU3MjItOTY1YmJiZjMtNTJlZS00YjliLTg4NTUtNTM0MzNmMzI2Mjg0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE4VDE1MjU0MFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJlOWVkZTZjYWM4MGVlZDMyYjcwMzVhYjM3MWFlYzI5ODUzOWYxYmEwMGIyODQzNTgzZDExMjFjNDBiYWE4ZDYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.L94IQyPnMLu_Gu3k5Ffyy0YAuLMy6LGnb4XPeRvIRY0 Restart HA, now you will get your AC entities.
Yes i confirm ! I ve 1 entities now (yepee !) but no interface. I can't do anything with.
You can, just add climate card and you will have all relevant functionality.
I just tried. I can only see the status of the air conditioner. Maybe I'm doing it wrong?
— Reply to this email directly, view it on GitHub https://github.com/bigmoby/fglair_for_homeassistant/issues/151#issuecomment-2295305161, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6TTTPFLHMZIXYU3ZD7UA3ZSC6DTAVCNFSM6AAAAABLAVCOWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMYDKMJWGE . You are receiving this because you commented.Message ID: @.***>
I tried adding a badge. Using YAML mode, I can't find a "climate" entity. When I add by entity I only find the entity "climate.ac_uty_a0cc2bf20410". This one offers me only one “badge”: the mode. On the other hand, under Google Home, I see everything correctly.
Please try the latest version of the fglair component: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.17
Does it have a fix? I don't want it to override the workaround in case of not...
On Mon, 19 Aug 2024 at 11:42, BigMoby @.***> wrote:
Please try the latest version of the fglair component: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.17
— Reply to this email directly, view it on GitHub https://github.com/bigmoby/fglair_for_homeassistant/issues/151#issuecomment-2296005939, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6TTTKA2KLWLQ2JQEYNCQ3ZSGVXPAVCNFSM6AAAAABLAVCOWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGAYDKOJTHE . You are receiving this because you commented.Message ID: @.***>
It's still not working...
Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:727
integration: Climate (documentation, issues)
First occurred: 10:45:38 (6 occurrences)
Last logged: 10:46:16
fglair_heatpump_controller: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
await self.async_update()
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 422, in async_update
self._swing_modes = self.swing_modes
^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 531, in swing_modes
self._fujitsu_device.vane_horizontal_positions()
File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 268, in vane_horizontal_positions
array = np.arange(1, self.get_af_horizontal_num_dir()["value"] + 1)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'
Running on 0.3.17
.
Does it have a fix? I don't want it to override the workaround in case of not... … On Mon, 19 Aug 2024 at 11:42, BigMoby @.> wrote: Please try the latest version of the fglair component: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.17 — Reply to this email directly, view it on GitHub <#151 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD6TTTKA2KLWLQ2JQEYNCQ3ZSGVXPAVCNFSM6AAAAABLAVCOWGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJWGAYDKOJTHE . You are receiving this because you commented.Message ID: @.>
@yogevabr1 Unfortunately, this component is often seen as free (as in "free beer"), and my support is considered something 'owed.' If I responded to the issue by suggesting you try the next version, it was because I genuinely believed, to the best of my ability, that I had fixed the bug. If you're unwilling to test it and don't want to actively contribute to improving the code (you could have even created a PR to try to fix it, but you didn't), then you're also free to uninstall the component. It's up to you!
Hi @Blizzke I just released this version: https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.18 I hope it fixes
@yogevabr1 Unfortunately, this component is often seen as free (as in "free beer"), and my support is considered something 'owed.' If I responded to the issue by suggesting you try the next version, it was because I genuinely believed, to the best of my ability, that I had fixed the bug. If you're unwilling to test it and don't want to actively contribute to improving the code (you could have even created a PR to try to fix it, but you didn't), then you're also free to uninstall the component. It's up to you!
Perfectly understandable reaction from your end, but the "fix" was more of a "rip everything out that doesn't work for you". Perhaps that is not the sort of PR you want? :-) In any case, if I find the time I might try to set up a venv for testing/debugging it here but I haven't had the chance yet so far.
As for 0.3.18
, we got past the horizontal here but now it's the vertical again:
Logger: homeassistant.components.climate
Source: helpers/entity_platform.py:727
integration: Climate (documentation, issues)
First occurred: 11:28:38 (3 occurrences)
Last logged: 11:28:38
fglair_heatpump_controller: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 727, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1300, in async_device_update
await self.async_update()
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 422, in async_update
self._swing_modes = self.swing_modes
^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 323, in __getattribute__
return super().__getattribute__(__name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/fglair_heatpump_controller/climate.py", line 536, in swing_modes
modes_list = self._fujitsu_device.get_swing_modes_supported()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/pyfujitsugeneral/splitAC.py", line 204, in get_swing_modes_supported
if self.get_af_vertical_direction()["value"] is not None:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 'value'
Perfectly understandable reaction from your end, but the "fix" was more of a "rip everything out that doesn't work for you". Perhaps that is not the sort of PR you want? :-)
Yes, not the best solution! :-D
Hi @Blizzke here again...https://github.com/bigmoby/fglair_for_homeassistant/releases/tag/v0.3.19 I'm sorry for this "trial and error" approach
I'll be darned :-)
It is picking up the entities now and I can control them, which is awesome! So big thank you for that.
As an FYI, since those were the errors: I don't see any swing support at all. For my situation: none of the 3 have a display (so guess there will not be a temperature reading in the readout) Living: has vertical and horizontal swing Office / Bedroom: Both have vertical swing.
If you need more information, perhaps you can add a sort of a capabilities dump when the debug mode is enabled that can be posted here?
Hi @Blizzke , great it sounds good. In your FGLair mobile app have you current temperature param shown? Have you different swing mode operation choices?
Only the target temperature, not the current one. I do have the swing settings in the app:
Oook, so current temperature issue ✅ ...it's not supported by your AC unit and then is not shown by the component. What happens if you select a swing mode that doesn't appear in the HA component? Does something happen or is it not supported even when selected from the mobile app?
From the app everything works. For Office/Bedroom i can modify vertical or have it auto swing, for Living Room I can change both vertical/horizontal. In HA I don't see anything resembling a swing mode in the component, perhaps I am overlooking it?
Nothing under settings either, that is HA stuff.
Hi @Blizzke , please if you could follow these steps:
git clone https://github.com/bigmoby/pyfujitsugeneral
import aiohttp
import asyncio
async def main():
print("Testing FGLairApiClient...")
username = "your-userid-here"
password = "your-password-here"
region = "eu"
tokenpath = "token.txt"
temperature_offset = 0
session = aiohttp.ClientSession()
client = FGLairApiClient(username, password, region, tokenpath, session)
if not await client.async_authenticate():
print("Unable to authenticate with Fujistsu General")
devices = await client.async_get_devices_dsn()
print("devices ---->>>")
print(devices)
splitac = SplitAC(devices[0], client, tokenpath, temperature_offset)
properties = await splitac.async_update_properties()
# print("Properties ---->>>", properties)
print("device name ---->>> %s", splitac.get_device_name())
print("op_status_desc ---->>>", splitac.get_op_status_desc())
print("display_temperature ---->>>", splitac.get_display_temperature())
# invoke_refresh_prop = await splitac.async_set_refresh(1)
invoke_refresh_prop = splitac.get_refresh()
print("invoke_refresh_prop ---->>>", invoke_refresh_prop)
display_temperature_degree = await splitac.async_get_display_temperature_degree()
print("display_temperature_degree ---->>>", display_temperature_degree)
fan_speed_desc = splitac.get_fan_speed_desc()
print("fan_speed_desc ---->>>", fan_speed_desc)
swing_modes_supported = splitac.get_swing_modes_supported()
print("swing_modes_supported ---->>>", swing_modes_supported)
vertical_direction = splitac.get_af_vertical_direction()
print("vertical_direction ---->>>", vertical_direction)
horizontal_direction = splitac.get_af_horizontal_direction()
print("horizontal_direction ---->>>", horizontal_direction)
await session.close()
if __name__ == "__main__":
asyncio.run(main())
pyfujitsugeneral
directory and execute python -m splitAC
Thanks
It's working for me, thank you! I see some are still having issues so I will leave the issue open for now.
Hi @Blizzke , please if you could follow these steps:
* clone the repo `git clone https://github.com/bigmoby/pyfujitsugeneral` * append this code (please remember to edit accordingly with you userid and password) at the end of the splitAC.py
If other people want to try, it's slightly more involved than just cloning the repo and adding the code. Preferably you'll first create a virtualenv (if you want to separate the extra packages). Then install the required packages:
python -m pip install numpy aiofiles aiohttp
After that you can run it from the repository root with PYTHON_PATH, so it knows where to find the pyfujitsugeneral
package:
PYHON_PATH=. .venv/bin/python -m pyfujitsugeneral.splitAC
The output is:
Testing FGLairApiClient...
/home/steve/.pyenv/versions/3.12.3/lib/python3.12/json/__init__.py:180: RuntimeWarning: coroutine '_make_delegate_method.<locals>.method' was never awaited
fp.write(chunk)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
devices ---->>>
['AC000W00......', 'AC000W00....., 'AC000W00.....']
device name ---->>> %s {'value': 'Living Room', 'key': 6.......8}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6.......8, 'data_updated_at': '2024-08-19T14:11:27Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}
(re-added this since I don't really want to add any keys / device-ids here)
If other people want to try, it's slightly more involved than just cloning the repo and adding the code. Preferably you'll first create a virtualenv (if you want to separate the extra packages). Then install the required packages:
I suggest you pip install -r requirements.txt
If other people want to try, it's slightly more involved than just cloning the repo and adding the code. Preferably you'll first create a virtualenv (if you want to separate the extra packages). Then install the required packages:
I suggest you
pip install -r requirements.txt
Naturally, thank you :) Had to do this between "soup and potatoes" as we say in Belgium so didn't even check.
I don't know the term "soup and potatoes" 😅 ...both too hot for the Sicilian climate! But I think I understood well! 😄 Please could check also for the others devices? You should edit this line
splitac = SplitAC(devices[0], client, tokenpath, temperature_offset)
and print for devices[1] and devices[2]
For your first device, Living room, it's pretty clear that:
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}
so I don't understand how, from the mobile app, the swing mode is supported! 🤷♂️ And also the temperature param is not supported...
"between soup and potatoes" simply means quickly between 2 other things ;-)
Anyway:
Testing FGLairApiClient...
/home/steve/.pyenv/versions/3.12.3/lib/python3.12/json/__init__.py:180: RuntimeWarning: coroutine '_make_delegate_method.<locals>.method' was never awaited
fp.write(chunk)
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
device ---->>> AC000W00.......
device name ---->>> %s {'value': 'Living Room', 'key': 6........}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6........, 'data_updated_at': '2024-08-19T14:47:29Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}
device ---->>> AC000W00.......
device name ---->>> %s {'value': 'Office', 'key': 6........}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6........, 'data_updated_at': '2024-08-19T14:46:30Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}
device ---->>> AC000W.......
device name ---->>> %s {'value': 'Bedroom', 'key': 6........}
op_status_desc ---->>> Normal
display_temperature ---->>> {}
invoke_refresh_prop ---->>> {'value': 0, 'key': 6........, 'data_updated_at': '2024-08-19T14:46:28Z'}
display_temperature_degree ---->>> None
fan_speed_desc ---->>> Auto
swing_modes_supported ---->>> None
vertical_direction ---->>> {}
horizontal_direction ---->>> {}
None of them seem to give any indication that they have swing support via your test code, yet i can control that using FGLAir for all 3 of them.
Oook...so the component, from my point of view, seems correct! ...no vertical_direction or horizontal_direction, I've no other hints to know if swing mode is supported or not.
@Blizzke could you post all the properties related to a device?
@Blizzke could you post all the properties related to a device?
Yeah, this is for the "Living Room":
(name: base_type / direction / display_name)
adjust_temperature: integer / input / adjust_temperature
adjust_temp_res_C: integer / output / adjust_temp_res_C
adjust_temp_res_F: integer / output / adjust_temp_res_F
af_horizontal_move_step1: integer / input / af_horizontal_move_step1
af_vertical_move_step1: integer / input / af_vertical_move_step1
building_name: string / input / building_name
child_lock_mode: boolean / input / child_lock_mode
child_lock_pin: string / input / child_lock_pin
common_zone_num_outlets: integer / input / common_zone_num_outlets
comm_version: integer / output / comm_version
damper_type_setting: boolean / input / damper_type_setting
day_name: string / input / day_name
day_night_all_setting: integer / input / day_night_all_setting
demand_control: integer / output / demand_control
device_capabilities: integer / output / device_capabilities
device_name: string / input / device_name
economy_mode: boolean / input / economy_mode
error_code: integer / output / error_code
fan_speed: integer / input / fan_speed
filter_clean: boolean / input / filter_clean
filter_sign_reset_display: boolean / input / filter_sign_reset_display
inner_unit_name: string / input / inner_unit_name
master_timer_on_off_1: boolean / input / master_timer_on_off_1
master_timer_on_off_2: boolean / input / master_timer_on_off_2
mcu_error: integer / input / mcu_error
mcu_fw_version: string / output / mcu_fw_version
model_name: string / input / model_name
night_name: string / input / night_name
operation_mode: integer / input / operation_mode
option_sensor_1_connection: boolean / input / option_sensor_1_connection
option_sensor_1_name: string / input / option_sensor_1_name
option_sensor_2_connection: boolean / input / option_sensor_2_connection
option_sensor_2_name: string / input / option_sensor_2_name
op_status: integer / output / op_status
rc_prohibition: integer / input / rc_prohibition
reboot_range: integer / input / reboot_range
reboot_start: integer / input / reboot_start
refresh: boolean / input / refresh
room_temp_sensor_day_reg: integer / input / room_temp_sensor_day_reg
room_temp_sensor_night_reg: integer / input / room_temp_sensor_night_reg
room_temp_sensor_setting: integer / input / room_temp_sensor_setting
service_contact_email: string / input / service_contact_email
service_contact_name: string / input / service_contact_name
service_contact_phone: string / input / service_contact_phone
service_function_address: integer / input / service_function_address
service_function_number: integer / input / service_function_number
service_function_setting: integer / input / service_function_setting
service_mode: boolean / input / service_mode
service_zone_function_num: integer / input / service_zone_function_num
service_zone_function_stg: integer / input / service_zone_function_stg
service_zone_mode: boolean / input / service_zone_mode
test_run: boolean / input / test_run
wifi_led_enable: boolean / input / wifi_led_enable
zones_configured: boolean / input / zones_configured
zone_1_day_night_reg: integer / input / zone_1_day_night_reg
zone_1_name: string / input / zone_1_name
zone_1_num_outlets: integer / input / zone_1_num_outlets
zone_1_open_close_setting: boolean / input / zone_1_open_close_setting
zone_2_day_night_reg: integer / input / zone_2_day_night_reg
zone_2_name: string / input / zone_2_name
zone_2_num_outlets: integer / input / zone_2_num_outlets
zone_2_open_close_setting: boolean / input / zone_2_open_close_setting
zone_3_day_night_reg: integer / input / zone_3_day_night_reg
zone_3_name: string / input / zone_3_name
zone_3_num_outlets: integer / input / zone_3_num_outlets
zone_3_open_close_setting: boolean / input / zone_3_open_close_setting
zone_4_day_night_reg: integer / input / zone_4_day_night_reg
zone_4_name: string / input / zone_4_name
zone_4_num_outlets: integer / input / zone_4_num_outlets
zone_4_open_close_setting: boolean / input / zone_4_open_close_setting
zone_5_day_night_reg: integer / input / zone_5_day_night_reg
zone_5_name: string / input / zone_5_name
zone_5_num_outlets: integer / input / zone_5_num_outlets
zone_5_open_close_setting: boolean / input / zone_5_open_close_setting
zone_6_day_night_reg: integer / input / zone_6_day_night_reg
zone_6_name: string / input / zone_6_name
zone_6_num_outlets: integer / input / zone_6_num_outlets
zone_6_open_close_setting: boolean / input / zone_6_open_close_setting
zone_7_day_night_reg: integer / input / zone_7_day_night_reg
zone_7_name: string / input / zone_7_name
zone_7_num_outlets: integer / input / zone_7_num_outlets
zone_7_open_close_setting: boolean / input / zone_7_open_close_setting
zone_8_day_night_reg: integer / input / zone_8_day_night_reg
zone_8_name: string / input / zone_8_name
zone_8_num_outlets: integer / input / zone_8_num_outlets
zone_8_open_close_setting: boolean / input / zone_8_open_close_setting
zone_cont_child_name: string / input / zone_cont_child_name
zone_cont_parent_name: string / input / zone_cont_parent_name
zone_cont_sensor_child: boolean / input / zone_cont_sensor_child
zone_cont_sensor_parent: boolean / input / zone_cont_sensor_parent
zone_device_capabilities: integer / output / zone_device_capabilities
zone_open_close_setting: integer / input / zone_open_close_setting
Ops, you could simply uncomment print("Properties ---->>>", properties)
Ops, you could simply uncomment
print("Properties ---->>>", properties)
I know, but i still don't feel comfortable posting data that is called "key" on github. I can mail you the dump if you want.
Uh, no, no problem at all! I don't think there're sensitive or private information...anyway, no problem at all!
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4913 Installed Version | 1.34.0 Stage | running Available Repositories | 1387 Downloaded Repositories | 3Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okDashboards
dashboards | 2 -- | -- resources | 0 views | 0 mode | storageRecorder
oldest_recorder_run | July 3, 2024 at 1:50 PM -- | -- current_recorder_run | July 17, 2024 at 8:52 AM estimated_db_size | 12.64 MiB database_engine | sqlite database_version | 3.45.3Checklist
Describe the issue
New user in us region and device does not appear. Logs show
KeyError: 'value'
after attempting to setdisplay_temperature_value = self._display_temperature["value"]
Reproduction steps
Debug logs
Diagnostics dump
No response