bit3725 / homeassistant-mi-water-purifier Goto Github PK
View Code? Open in Web Editor NEWXiaoMi Water Purifier component for Home Assistant.
XiaoMi Water Purifier component for Home Assistant.
I'm using hass.io version 0.82.1
My device model is Xiaomi water purifier 1A.
It seems the setup of the platform failed due to a "name error" which could possibly be caused by mismatching versions of the python dependencies.
Below is the error logs:
`018-11-25 00:18:42 ERROR (SyncWorker_7) [miio.protocol] unable to parse json '{"result":[net],"id":1}': Expecting value: line 1 column 12 (char 11)
2018-11-25 00:18:42 ERROR (MainThread) [homeassistant.components.sensor] Error while setting up platform mi_water_purifier
Traceback (most recent call last):
File "/config/custom_components/sensor/mi_water_purifier.py", line 159, in parse_data
status = self._device.send('get_prop', [])
File "/usr/local/lib/python3.6/site-packages/miio/device.py", line 263, in send
self.__id = m.data.value["id"]
TypeError: 'NoneType' object is not subscriptable
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File "/usr/local/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
return fut.result()
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/config/custom_components/sensor/mi_water_purifier.py", line 34, in setup_platform
waterPurifier = XiaomiWaterPurifier(device, name)
File "/config/custom_components/sensor/mi_water_purifier.py", line 116, in init
self.parse_data()
File "/config/custom_components/sensor/mi_water_purifier.py", line 177, in parse_data
except DeviceException:
NameError: name 'DeviceException' is not defined`
2024-04-22 10:16:26.164 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration mi_water_purifier which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2021-04-18 21:21:57 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'mi_water_purifier'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'mi_water_purifier'
Hi, first of all, thank you for this component, works great on latest (0.95.0) home assistant.
Is there any possibility to replicate the behavior from official Mihome app, the one when I turn water purifier on, it starts to update water quality in real time? I see that home assistant updates water quality sensors too, but very infrequently.
I've tried to create automation which executes homeassistant.update_entity
for sensor.filtered_water
every 4 seconds, but it doesn't seem to change anything. Thought maybe you can help.
hass.io can't use the program.
i copy mi-water-purifier.py to /config/custom_components/sensor.
but can't run.
Hi, it worked for months, but 2 or 3 months ago it stop to work, do not remember exactly what HA version what was.
I tried to copy again the folder and files to custom_components, and added the code to configuration.yaml under sensor:
- platform: mi_water_purifier
host: 192.168.1.19
token: 2006575exxxxxxxxxxxxxxxxxxxxxxxx
name: Water_Purifier
when I do a check on configuration before a restart it say: Platform error sensor.mi_water_purifier - Integration 'mi_water_purifier' not found.
What it is the problem?
Hi,
I am trying to install this component but the installation guide is confusing. It say:
1: Copy custom_components/sensor/mi_water_purifier.py to .homeassistant/custom_components/sensor
But the folders and .py files are:
custom_components/mi_water_purifier/sensor.py
I am not sure where to put __init__.py
and sensor.py
. or if I need to rename the sensor.py to mi_water_purifier.py
Also I have a problem on configuration.yaml and the group configuration, it don't pass the verification and give me the error:
Invalid config for [group]: expected a dictionary for dictionary value @ data['group']. Got [OrderedDict([('xiaomi_water_purifier', OrderedDict([('name', 'Xiaomi Water Purifier'), ('icon', 'mdi:water'), ('entities', ['sensor.tap_water', 'sensor.filtered_water', 'sensor.pp_cotton_filter', 'sensor.front_active_carbon_filter', 'sensor.ro_filter', 'sensor.rear_active_carbon_filter'])]))])]. (See /config/configuration.yaml, line 13).
Can you help me please?
Thanks
大神您好,测试了下,您的插件非常好用,请问可否转载到国内Home Assistant论坛(bbs.hassbian.com),让更多人看到并用上您的插件?
非常感谢!
Integration mi_water_purifier not found when trying to verify its sensor platform.
I've got this error when I try to start it up. Are they any chances after hass os 0.94? File is correctly placed, hmm.
ensor.filtered_water (<class 'custom_components.mi_water_purifier.sensor.XiaomiWaterPurifierSensor'>) implements device_state_attributes. Please report it to the custom component author.
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.