Closed mill1000 closed 2 years ago
Closes #159
Hello. I would like to test this but I'm not sure what's the proper procedure for moving from using the release HACS integration, to testing out a branch? Should I just remove the HACS or is there a more elegant way of doing it?
I might be doing this wrong.
This is what I got in the logs:
2022-07-08 10:37:33 ERROR (MainThread) [homeassistant.components.climate] Error while setting up midea_ac platform for climate
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform
await asyncio.shield(task)
File "/config/custom_components/midea_ac/climate.py", line 95, in async_setup_platform
await hass.async_add_executor_job(device.get_capabilities)
AttributeError: 'air_conditioning' object has no attribute 'get_capabilities'
Hi,
How are you running HA? Docker, HA OS, bare metal?
Based on the error message it appears that HA is pickup up the old version of msmart. When you grabbed the msmart branch did you install it?
Otherwise it looks like you installed midea-ac-py correctly. Just an FYI, there is no need to change the token and key, those values should be constant.
HA docker
Ah ok I think I understand. For some reason I thought that midea-msmart just provides the standalone tool to grab the token and key. Does setting up via HACS auto install midea-msmart somewhere? I'm not sure where to clone that repo out. Thank you.
Yes I think HA normally takes care of the dependencies for you, but you'll have to install mac-zhou/midea-msmart#80 manually.
You can use the following command to get a bash terminal in your container. Replace CONTAINER_ID
with your HA container (probably homeassistant
)
docker exec -it CONTAINER_ID bash
And then use pip to install directly from Git. Here I'm install directly from my branch because it appears pip can't install from a PR.
pip install git+https://github.com/mill1000/midea-msmart.git@feature/capabilities
Just wanted to update that I haven't had a free moment to test out this branch again, sorry about that.
No worries. This PR was merged to master but there have been some gotchas due to broken dependencies. #183
Only report supported operational and swing modes to HA. Requires mac-zhou/midea-msmart#80