HASS-sonoff-ewelink
HASS-sonoff-ewelink copied to clipboard
IFan #03 on Dev
- Latest version from Dev
- I haven't seen anyone else raise this unless I missed it?
When trying to turn the fan on or even change speed levels on the ifan03 I get the following and attached? Anyone else getting this?
I did delete the cache as well.
1
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 133, in handle_call_service
connection.context(msg),
File "/usr/src/homeassistant/homeassistant/core.py", line 1235, in async_call
await asyncio.shield(self._execute_service(handler, service_call))
File "/usr/src/homeassistant/homeassistant/core.py", line 1260, in _execute_service
await handler.func(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 205, in handle_service
self._platforms.values(), func, call, service_name, required_features
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 336, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 369, in _handle_service_platform_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 286, in async_update_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state
state = self.state
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 587, in state
return STATE_ON if self.is_on else STATE_OFF
File "/config/custom_components/sonoff/fan.py", line 40, in is_on
self._state = (self.get_device()['params']['switches'][1]['switch'] == 'on')
KeyError: 1```
post the output of this script https://github.com/peterbuga/HASS-sonoff-ewelink/tree/dev/sonoff-debug
Sure, it shows:
"devicelist": [
{
"__v": 0,
"brandLogoUrl": "https://eu-ota.coolkit.cc/logo/Q4RJzznuKEeDgFXbgyS9OClbyEDR7gXd.png",
"brandName": "SONOFF",
"devConfig": {},
"devGroups": [],
"deviceStatus": "",
"deviceUrl": "",
"extra": {
"_id": "[hidden]",
"extra": {
"brandId": "5c4c1aee3a7d24c7100be054",
"chipid": "00AA2A1D",
"description": "20190529002",
"manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8",
"model": "PSF-BFB-GL",
"modelInfo": "5ca1f6d0b5210ca205adf0fc",
"ui": "\u667a\u80fd\u98ce\u6247\u706f",
"uiid": 34
}
},
"group": "",
"groups": [],
"location": "",
"offlineTime": "xxxx-xx-xxxxx:xx:xx.xxx",
"online": true,
"onlineTime": "xxxx-xx-xxxxx:xx:xx.xxx",
"params": {
"configure": [
{
"outlet": 0,
"startup": "on"
},
{
"outlet": 1,
"startup": "off"
},
{
"outlet": 2,
"startup": "stay"
},
{
"outlet": 3,
"startup": "stay"
}
],
"fwVersion": "3.4.0",
"init": 1,
"rssi": -52,
"sledOnline": "on",
"switches": [
{
"outlet": 0,
"switch": "off"
},
{
"outlet": 1,
"switch": "off"
},
{
"outlet": 2,
"switch": "off"
},
{
"outlet": 3,
"switch": "off"
}
],
"version": 8
},
"productModel": "iFan",
"settings": {
"alarmNotify": 1,
"appDoorbellNotify": 1,
"opsHistory": 1,
"opsNotify": 0,
"wxAlarmNotify": 0,
"wxDoorbellNotify": 0,
"wxOpsNotify": 0
},
"sharedTo": [],
"showBrand": true,
"type": "10",
"uiid": 34
},
{
"__v": 0,
"brandLogoUrl": "https://eu-ota.coolkit.cc/logo/Q4RJzznuKEeDgFXbgyS9OClbyEDR7gXd.png",
"brandName": "SONOFF",
"devConfig": {},
"devGroups": [],
"deviceStatus": "",
"deviceUrl": "https://eu-api.coolkit.cc/api/detail/5c700fa3cc248c47441fd23f_en.html",
"extra": {
"extra": {
"brandId": "5c4c1aee3a7d24c7100be054",
"chipid": "00771933",
"description": "20190611015",
"mac": "xx:xx:xx:xx:xx:xx",
"manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8",
"model": "PSF-B04-GL",
"modelInfo": "5c700fa3cc248c47441fd23f",
"staMac": "xx:xx:xx:xx:xx:xx",
"ui": "\u53cc\u901a\u9053\u5f00\u5173",
"uiid": 7
}
},
"group": "",
"groups": [],
"location": "",
"online": true,
"params": {
"configure": [
{
"outlet": 0,
"startup": "off"
},
{
"outlet": 1,
"startup": "off"
},
{
"outlet": 2,
"startup": "off"
},
{
"outlet": 3,
"startup": "off"
}
],
"fwVersion": "3.3.0",
"init": 1,
"lock": 0,
"pulses": [
{
"outlet": 0,
"pulse": "off",
"width": 1000
},
{
"outlet": 1,
"pulse": "off",
"width": 1000
},
{
"outlet": 2,
"pulse": "off",
"width": 1000
},
{
"outlet": 3,
"pulse": "off",
"width": 1000
}
],
"rssi": -52,
"sledOnline": "on",
"switches": [
{
"outlet": 0,
"switch": "off"
},
{
"outlet": 1,
"switch": "off"
},
{
"outlet": 2,
"switch": "off"
},
{
"outlet": 3,
"switch": "off"
}
],
"version": 8
},
"productModel": "TX2C",
"settings": {
"alarmNotify": 1,
"appDoorbellNotify": 1,
"opsHistory": 1,
"opsNotify": 0,
"wxAlarmNotify": 0,
"wxDoorbellNotify": 0,
"wxOpsNotify": 0
},
"sharedTo": [],
"showBrand": true,
"tags": {
"m_c940_aimt": "on"
},
"type": "10",
"uiid": 7
}
],
"error": 0
}
Same problem here.
Same problem with the ifan02. Plus for the ifan02, only the fan entity shows up: the switch doesn't show up anymore in HA. I noticed that this happened after upgrading the firmware of the ifan02 to version 3.4.0.
Thanks.
[ { "__v": 0, "_id": "[hidden]", "apikey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "brandLogoUrl": "https://us-ota.coolkit.cc/logo/m6N8zJB0O3EVvhCei6zCPStFeKYKAzSa.png", "brandName": "Sonoff", "createdAt": "xxxx-xx-xxxxx:xx:xx.xxx", "devConfig": {}, "devGroups": [], "deviceUrl": "https://us-api.coolkit.cc/api/detail/59dc87a65c1af3a660ca6b53_en.html", "deviceid": "[hidden]", "devicekey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "extra": { "_id": "[hidden]", "extra": { "apmac": "xx:xx:xx:xx:xx:xx", "brandId": "58e5f344baeb368720e25469", "chipid": "00DB9F64", "description": "WO1818627", "mac": "xx:xx:xx:xx:xx:xx", "manufacturer": "\u6df1\u5733\u677e\u8bfa\u6280\u672f\u6709\u9650\u516c\u53f8", "model": "PSF-B04-GL", "modelInfo": "59dc87a65c1af3a660ca6b53", "staMac": "xx:xx:xx:xx:xx:xx", "ui": "\u667a\u80fd\u98ce\u6247\u706f", "uiid": 34 } }, "family": { "id": "5ec40b822b39240007c4ed70", "index": 0, "room": { "id": "5ec40b822b39240007c4ed6f" } }, "group": "", "groups": [], "ip": "[hidden]", "location": "", "name": "[hidden]",, "online": true, "onlineTime": "xxxx-xx-xxxxx:xx:xx.xxx", "params": { "bindInfos": { "gaction": [ "0faec1e7-64bd-4611-bf40-04f0809c9d6b_ewelink-google-home-v1" ] }, "configure": [ { "outlet": 0, "startup": "off" }, { "outlet": 1, "startup": "off" }, { "outlet": 2, "startup": "off" }, { "outlet": 3, "startup": "off" } ], "fwVersion": "3.4.0", "init": 1, "lock": 0, "pulses": [ { "outlet": 0, "pulse": "off", "width": 1000 }, { "outlet": 1, "pulse": "off", "width": 1000 }, { "outlet": 2, "pulse": "off", "width": 1000 }, { "outlet": 3, "pulse": "off", "width": 1000 } ], "rssi": -50, "sledOnline": "on", "staMac": "xx:xx:xx:xx:xx:xx", "switches": [ { "outlet": 0, "switch": "on" }, { "outlet": 1, "switch": "off" }, { "outlet": 2, "switch": "off" }, { "outlet": 3, "switch": "off" } ], "version": 8 }, "productModel": "iFan02", "settings": { "alarmNotify": 1, "appDoorbellNotify": 1, "opsHistory": 1, "opsNotify": 0, "wxAlarmNotify": 0, "wxDoorbellNotify": 0, "wxOpsNotify": 0 }, "shareUsersInfo": [], "sharedTo": [], "showBrand": true, "type": "10", "uiid": 34 } ]