Open leva0887 opened 3 years ago
One way you can test, is by installing python-miio (https://python-miio.readthedocs.io/en/latest/discovery.html#installation) and trying the commands like this:
miiocli device --ip 192.168.1.XXX --token ZZZZZZZZZZZZZZZZZZZZZZZZ raw_command get_properties '[{"piid":1,"siid":2}]'
This will allow you to validate the necessary values for using in the code :)
have you tried this?
One way you can test, is by installing python-miio (https://python-miio.readthedocs.io/en/latest/discovery.html#installation) and trying the commands like this:
miiocli device --ip 192.168.1.XXX --token ZZZZZZZZZZZZZZZZZZZZZZZZ raw_command get_properties '[{"piid":1,"siid":2}]'
This will allow you to validate the necessary values for using in the code :)have you tried this?
obviously this is a message for @sygys. I'm just testing. I'm not a pyton programmer
Dear colleagues? Someone will finish the job? I really want without servers china!
Logger: custom_components.miheater.climate Source: /config/custom_components/miheater/climate.py:191 Integration: miheater (documentation) First occurred: 12:48:44 PM (3 occurrences) Last logged: 12:48:44 PM
Unsupported model: zhimi.heater.za1 NoneType: None
Logger: homeassistant.components.climate Source: custom_components/miheater/climate.py:193 Integration: Climate (documentation, issues) First occurred: 12:48:44 PM (3 occurrences) Last logged: 12:48:44 PM
Error while setting up miheater platform for climate Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 199, in _async_setup_platform await asyncio.shield(task) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/miheater/climate.py", line 80, in setup_platform miHeater = MiHeater(device, name, model, unique_id, hass) File "/config/custom_components/miheater/climate.py", line 116, in init self.getAttrData() File "/config/custom_components/miheater/climate.py", line 193, in getAttrData data['power'] = power[0]["value"] UnboundLocalError: local variable 'power' referenced before assignment