Closed 846637834 closed 3 years ago
The p10 support is ready. A release of python-miio (0.5.4) is required beforehand.
And p9 too, please
The p9
is also supported. Just the p11
support is missing in python-miio
at the moment.
The
p9
is also supported. Just thep11
support is missing inpython-miio
at the moment.
But I have an error in my HomeAssistant:
Logger: custom_components.xiaomi_miio_airpurifier.fan
Source: custom_components/xiaomi_miio_airpurifier/fan.py:859
Integration: xiaomi_miio_airpurifier (documentation, issues)
First occurred: 4:31:48 (1 occurrences)
Last logged: 4:31:48
Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_airpurifier/issues and provide the following data: dmaker.fan.p9
The implementation is ready but not merged. A release of python-miio (0.5.4) is required first.
there is another error after today updates:
Platform error fan.xiaomi_miio_airpurifier - cannot import name 'FanMiot' from 'miio' (/usr/local/lib/python3.8/site-packages/miio/init.py)
@maximatchev Do you have access to your HA host? Are you able to go to this directory (/usr/local/lib/python3.8/site-packages/miio/init.py
) to check which python-miio version is installed here?
There is no "python3.8"... Only "python2.7" and "python3.7" I need python3.8?
Your system is complaining about this location, so I assume the host complaining about this path has python3.8 installed.
Python 3.8 in docker container (my fault)
python2-miio (0.0.3) - Python2 library for interfacing with Xiaomi miio components INSTALLED: 0.0.3 (latest) python-miio (0.5.4) - Python library for interfacing with Xiaomi smart appliances INSTALLED: 0.5.4 (latest)
there is another error after today updates:
Platform error fan.xiaomi_miio_airpurifier - cannot import name 'FanMiot' from 'miio' (/usr/local/lib/python3.8/site-packages/miio/init.py)
Same error on hassos 4.16 & 0.6.2 ha 0.117.5
@maximatchev Could you provide the content of the
/usr/local/lib/python3.8/site-packages/miio/__init__.py
I want to make sure you have the most recent version in place.
# flake8: noqa
from importlib_metadata import version # type: ignore
from miio.airconditioningcompanion import (
AirConditioningCompanion,
AirConditioningCompanionV3,
)
from miio.airdehumidifier import AirDehumidifier
from miio.airfresh import AirFresh
from miio.airfresh_t2017 import AirFreshT2017
from miio.airhumidifier import AirHumidifier, AirHumidifierCA1, AirHumidifierCB1
from miio.airhumidifier_jsq import AirHumidifierJsq
from miio.airhumidifier_miot import AirHumidifierMiot
from miio.airhumidifier_mjjsq import AirHumidifierMjjsq
from miio.airpurifier import AirPurifier
from miio.airpurifier_miot import AirPurifierMiot
from miio.airqualitymonitor import AirQualityMonitor
from miio.aqaracamera import AqaraCamera
from miio.ceil import Ceil
from miio.chuangmi_camera import ChuangmiCamera
from miio.chuangmi_ir import ChuangmiIr
from miio.chuangmi_plug import ChuangmiPlug, Plug, PlugV1, PlugV3
from miio.cooker import Cooker
from miio.device import Device
from miio.exceptions import DeviceError, DeviceException
from miio.fan import Fan, FanP5, FanSA1, FanV2, FanZA1, FanZA4
from miio.gateway import Gateway
from miio.heater import Heater
from miio.philips_bulb import PhilipsBulb, PhilipsWhiteBulb
from miio.philips_eyecare import PhilipsEyecare
from miio.philips_moonlight import PhilipsMoonlight
from miio.philips_rwread import PhilipsRwread
from miio.powerstrip import PowerStrip
from miio.protocol import Message, Utils
from miio.pwzn_relay import PwznRelay
from miio.toiletlid import Toiletlid
from miio.vacuum import Vacuum, VacuumException
from miio.vacuumcontainers import (
CleaningDetails,
CleaningSummary,
ConsumableStatus,
DNDStatus,
Timer,
VacuumStatus,
)
from miio.viomivacuum import ViomiVacuum
from miio.waterpurifier import WaterPurifier
from miio.wifirepeater import WifiRepeater
from miio.wifispeaker import WifiSpeaker
from miio.yeelight import Yeelight
from miio.discovery import Discovery
__version__ = version("python-miio")
This is the __init__.py
of python-miio 0.5.3 because this line is missing:
https://github.com/rytilahti/python-miio/blob/master/miio/__init__.py#L35
I assume a new HA version is required with an updated python-miio requirement to fix this issue.
This is the
__init__.py
of python-miio 0.5.3 because this line is missing:https://github.com/rytilahti/python-miio/blob/master/miio/__init__.py#L35
I assume a new HA version is required with an updated python-miio requirement to fix this issue.
So I can reinstall xiaomi miio integration... Will it help?
I don't know how the docker setup exactly works. I think every change is lost as soon you restart the container. I can do changes (pip3 install python-miio -U
) manually. May be this change is already lost if you just restart HA.
Thank you, @syssi I'll wait new HA version
it's strange....
I upgrade my HA (new version 0.118.0 today)
If I uninstall Xiaomi-miio integration, restart HA and agree with install Xiaomi-miio integration, then I have __init__.py
of python-miio 0.5.4
But when I restart HA again, I have __init__.py
of python-miio 0.5.3
Manual uninstall and install of Xiaomi-miio integration does not give correct result (0.5.3). Version 0.5.4 appears only after HA find Xiaomi-miio integration itself
Excuse me @syssi, maybe it's not your question but I don't know what to do with it
My fix will be part of HA 0.119. If you install the dev branch of HA the issue should be gone.
hi, @syssi
excuse me again...
There is another error at Homeassistant 2020.12.0 with my dmaker.p9:
Logger: homeassistant.components.fan
Source: custom_components/xiaomi_miio_airpurifier/fan.py:2285
Integration: Вентилятор (documentation, issues)
First occurred: 1:33:15 (1 occurrences)
Last logged: 1:33:15
xiaomi_miio_airpurifier: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
await task
File "/config/custom_components/xiaomi_miio_airpurifier/fan.py", line 2285, in async_update
self._natural_mode = state.mode == FanOperationMode.Nature
File "/usr/local/lib/python3.8/site-packages/miio/fan_miot.py", line 106, in mode
return OperationMode[OperationModeMiot(self.data["mode"]).name]
File "/usr/local/lib/python3.8/enum.py", line 315, in __call__
return cls.__new__(cls, value)
File "/usr/local/lib/python3.8/enum.py", line 617, in __new__
raise ve_exc
ValueError: 2 is not a valid OperationModeMiot
This is a bug. Could you create a new issue? Thanks!
Unsupported device found! Please support this device, thanks!