Closed TheLordVader closed 2 years ago
Any error/warning logs ?
Yes.
`Logger: homeassistant.components.fan Source: helpers/template.py:408 Integration: Fan (documentation, issues) First occurred: 16:37:05 (3 occurrences) Last logged: 16:48:32
xiaomi_miot: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 406, in async_render render_result = _render_with_context(self.template, compiled, kwargs) File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 1771, in _render_with_context return template.render(kwargs) File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render self.environment.handle_exception() File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception raise rewrite_traceback_stack(source=source) File "", line 1, in top-level template code TypeError: '<=' not supported between instances of 'NoneType' and 'int'
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 431, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 684, in async_device_update await task File "/config/custom_components/xiaomi_miot/init.py", line 1121, in async_update results = await self._miio2miot.async_get_miot_props(self.miot_device, local_mapping) File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 74, in async_get_miot_props return await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, *self.kwargs) File "/config/custom_components/xiaomi_miot/core/miio2miot.py", line 99, in get_miot_props val = tpl.render({ File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 375, in render return run_callback_threadsafe( File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 445, in result return self.get_result() File "/usr/local/lib/python3.9/concurrent/futures/_base.py", line 390, in get_result raise self.exception File "/usr/src/homeassistant/homeassistant/util/async.py", line 58, in run_callback future.set_result(callback(args)) File "/usr/src/homeassistant/homeassistant/helpers/template.py", line 408, in async_render raise TemplateError(err) from err homeassistant.exceptions.TemplateError: TypeError: '<=' not supported between instances of 'NoneType' and 'int' `
Air Purifier looks like this (unable to control unit on/off):
With the fan, all entities are unavailable.
homeassistant.exceptions.TemplateError: TypeError: '<=' not supported between instances of 'NoneType' and 'int'
zhimi.fan.za4
needs to be upgraded to master branch.
About zhimi.airpurifier.mb4
, show me the state attributes of climate entity.
Upgrading to Master branch returns this error: `This error originated from a custom integration.
Logger: custom_components.xiaomi_miot.fan Source: custom_components/xiaomi_miot/init.py:1183 Integration: Xiaomi Miot Auto (documentation, issues) First occurred: 08:41:34 (2 occurrences) Last logged: 08:42:01
Mi Standing Fan 2S Fan: Got MiioException while fetching the state: Unable to discover the device 192.168.1.31, mapping: {'fan.on': {'siid': 2, 'piid': 1}, 'fan.fan_level': {'siid': 2, 'piid': 2}, 'fan.horizontal_swing': {'siid': 2, 'piid': 3}, 'fan.horizontal_angle': {'siid': 2, 'piid': 4}, 'fan.mode': {'siid': 2, 'piid': 5}}, max_properties: 10/5 Mi Standing Fan 2S Fan: Got MiioException while fetching the state: Unable to discover the device 192.168.1.31, mapping: {'fan.on': {'siid': 2, 'piid': 1}, 'fan.fan_level': {'siid': 2, 'piid': 2}, 'fan.horizontal_swing': {'siid': 2, 'piid': 3}, 'fan.horizontal_angle': {'siid': 2, 'piid': 4}, 'fan.mode': {'siid': 2, 'piid': 5}, 'indicator_light.on': {'siid': 5, 'piid': 1}, 'alarm': {'siid': 4, 'piid': 1}, 'physical_controls_locked': {'siid': 3, 'piid': 1}}, max_properties: 10/8`
About
zhimi.airpurifier.mb4
, show me the state attributes of climate entity.
Problem solved when updating to master branch.
PROBLEM SOLVED by deleting device from Xiaomi Home app and adding the fan again, after that I renewed devices in the add-on.
Hm, I'm on v0.7.10 and can't get zhimi.fan.za4
to work locally, tried removing and adding it to my CN Mi Home account 5 times now getting new local token every time and still all Fan controls are disabled.
When I add it as Cloud device it becomes unavailable every few minutes and it's hard to write reliable integrations
but it has high wifi signal
What should I try? Thanks!
zhimi.fan.za4 by zhimi
and
zhimi.airpurifier.mb4 by zhimi
became unavailable upon updating to 0.5.0. Cloud devices connected via Xiaomi hub/gateway works fine. I tried Master branch and even downgrading to v0.4.17 without success. I have renewed all devices but it is not helping.