tsunglung / xiaomiairfryer Goto Github PK
View Code? Open in Web Editor NEWXiaomi Smart Air Fryer integration for Home Assistant
License: MIT License
Xiaomi Smart Air Fryer integration for Home Assistant
License: MIT License
Good morning,
Please can you add the new 4 liter fryer?
Model: careli.fryer.maf05a
Thanks.
First of all, thanks for this nice integration for the Xiaomi Air Fryer.
I have imported it to HA but have 2 issues:
How can I do these ?
I am a new HA user but as far as I see there is nothing on the GUI to change the setting to "target time" for example.
any ideas ?
Hello,
thank you very much for this integration!
I have a question what turn_pot sensor is for? I though it would change status if fryer shows alert to shake food, but seems I am wrong. Is there any sensor for shaking food? I am planing to make alarm from HA to phone if Air fryer needs me to shake the food 😄
EDIT: Seems It works as expected anyway. I am closing this.
I added my airfry and I can track all entities without any problem. I can also start / stop with integration. But I can't set temperature or target time.
It returns :
"Error running action
Unknown error"
When I try to run both with single script it returns this error message :
Failed to call service script/meal. Passing coroutines is forbidden, use tasks explicitly.
What can I do ?
I am running the 2024.2 beta where HA has upgraded to Python 3.12. When starting HA I get the following error in the logs:
Setup failed for custom integration 'xiaomi_airfryer': Unable to import component: No module named 'imp'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 251, in _async_setup_component
component = integration.get_component()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 827, in get_component
ComponentProtocol, importlib.import_module(self.pkg_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 994, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/config/custom_components/xiaomi_airfryer/__init__.py", line 29, in <module>
from miio import DeviceException
File "/usr/local/lib/python3.12/site-packages/miio/__init__.py", line 12, in <module>
from miio.device import Device, DeviceStatus # isort: skip
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/miio/device.py", line 13, in <module>
from .miioprotocol import MiIOProtocol
File "/usr/local/lib/python3.12/site-packages/miio/miioprotocol.py", line 13, in <module>
import construct
File "/usr/local/lib/python3.12/site-packages/construct/__init__.py", line 22, in <module>
from construct.core import *
File "/usr/local/lib/python3.12/site-packages/construct/core.py", line 3, in <module>
import struct, io, binascii, itertools, collections, pickle, sys, os, tempfile, hashlib, importlib, imp
ModuleNotFoundError: No module named 'imp'
I try to do an interval cooking script. For that it needs to know the status before it goes to the next step. The only status I can select is turned on or off, and that does not seem to work. I can see the unit deliver different status on screen "cocked" , "cocking", "standby", etc.
Hello,
Trying to configure the integration but it fails. Tried both methods (login + password and IP + token). The Fryer is on and connected to wi-fi. I can control it via the Mi app.
Can you please help! Thanks a ton!
NAME: Mi Smart Air Fryer 3.5L
MODEL: careli.fryer.maf07
HASS: 2024.2.2 (running in Docker)
Integration installed via HACS.
I can add my air fryer without the problem, but all my sensors are unknown
Thanks for your help
Ed
This is off topic, and not an issue, sorry about that,
is it possible to modify default "recipes" of the device?
At least time and temperature, I can deal with the default name of the thing.
I know workaround would be automation with custom recipe and button that would run it.
Hi, I've installed the plugin via Hacks, and try to to configure it, it fails with the error:
Config flow could not be loaded: <html> <head><title>504 Gateway Time-out</title></head> <body> <center><h1>504 Gateway Time-out</h1></center> <hr><center>nginx</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page -->
I have the Xiaomi Miio plugin installed, and working with other integrations.
I'm running my HA as a docker container.
As per the config_flow.py I guess it must be something with the self-referencing URL of my Home assistant instance?
I tried to run it on the local addres (http://hass.custom.local:8123) and the outer address (eg. https://hass.example.com) but same error. How can I debug it? Thanks.
Setup: "2. Enter your Xiaomi Account and Password" never ask me for credentials
Hi,
Looks like this integration doesn't support the model.
It recognises the device in home assistant, reads all sensors and you can turn on/off
but services not working
That would be great
Many thanks
In new version 2022.4 don't work: import error. Please fix it when you can. Thanks in advance and for your amazing work
Hello,
Here is a missing feature in this integration, concerning both Set Target time and Set Target temperature services.
For both target_time
and target_temperature
, simple numbers directly written in the automation are allowed. But I can't put any helper instead of it, even an imput_number helper.
In other words :
This works
`sequence:
- service: xiaomi_airfryer.target_temperature
data:
entity_id: switch.xiaomi_airfryer_mi_smart_air_fryer_3_5l
target_temperature: 200`
But that does not:
`sequence:
- service: xiaomi_airfryer.target_temperature
data:
entity_id: switch.xiaomi_airfryer_mi_smart_air_fryer_3.5l
target_temperature: input_number.friteuse_temperature`
We should be able to set up these values directly from Home Assistant UI. This is annoying to go in the automation itself to update them.
Hi, after login (de server), I receive the error: "Unknown error occurred".
Same happens when I use manual configuration using the token.
The model is careli.fryer.maf02
Could you help me or do u need more info ?
Hi,
I get the following error when trying to login to de server with my xiaomi account:
Logger: aiohttp.server
Source: custom_components/xiaomi_airfryer/config_flow.py:235
Integration: Xiaomi AirFryer (documentation, issues)
First occurred: 08:31:43 (3 occurrences)
Last logged: 08:33:03
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 435, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 60, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 82, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 236, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 136, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 180, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 73, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 110, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 280, in async_configure
result = await self._async_handle_step(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 367, in _async_handle_step
result: FlowResult = await getattr(flow, method)(user_input)
File "/config/custom_components/xiaomi_airfryer/config_flow.py", line 235, in async_step_cloud
miio_cloud = MiCloud(cloud_username, cloud_password)
File "/usr/local/lib/python3.10/site-packages/micloud/micloud.py", line 38, in init
timezone = datetime.datetime.now(tzlocal.get_localzone()).strftime('%z')
File "/usr/local/lib/python3.10/site-packages/tzlocal/unix.py", line 203, in get_localzone
_cache_tz = _get_localzone()
File "/usr/local/lib/python3.10/site-packages/tzlocal/unix.py", line 161, in _get_localzone
tzenv = utils._tz_from_env()
File "/usr/local/lib/python3.10/site-packages/tzlocal/utils.py", line 125, in _tz_from_env
raise ZoneInfoNotFoundError(
tzlocal.utils.ZoneInfoNotFoundError: 'tzlocal() does not support non-zoneinfo timezones like %s. \nPlease use a timezone in the form of Continent/City'
The issue is on ha OS 9.3 and core is 2022.12.1.
It was the same in previous versions. The entity never updates itself even the device warns with beep to turn the food at the half of the cooking period.
need to remove deprecated asyncio coroutine in switch.py line 217 and 218
Facing login troubles in the Home Assistant app with your Xiaomi account? Here's how to fix it in a few simple steps:
Open the Xiaomi app on your mobile device.
Navigate to your profile by clicking on your profile name.
In your profile section, look for a column labeled "Account."
Next to "Account," you will find a series of 10 numbers. Copy this.
In Home Assistant, enter the 10-digit number you copied as your username, along with your Xiaomi app password and country server.
Submit the information and it should work.
Hello,
When I try to add integration, in the last step when I have to choose my air fryer in the list, there is no list!
my fryer modèl is MAF02 my server for the cloud is SG
I can't add it manually because my fryer doesn't appear in the Mi Cloud token extractor app, so I can't have the token
What can I do?
Please, help me.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.