- 积分
- 559
- 金钱
- 518
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
高级会员
- 积分
- 559
- 金钱
- 518
- HASS币
- 0
|
发表于 2021-5-29 21:41:02
|
显示全部楼层
报错详情:
Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/zhimodbus/climate.py:428
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 下午8:33:31 (1 occurrences)
Last logged: 下午8:33:31
[140609311453776] 'ZhiModbusClimate' object has no attribute '_fan_modes'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 136, in handle_call_service
await hass.services.async_call(
File "/usr/src/homeassistant/homeassistant/core.py", line 1455, in async_call
task.result()
File "/usr/src/homeassistant/homeassistant/core.py", line 1490, in _execute_service
await handler.job.target(service_call)
File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 204, in handle_service
await self.hass.helpers.service.entity_service_call(
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 595, in entity_service_call
future.result() # pop exception if have
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 664, in async_request_call
await coro
File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 632, in _handle_entity_call
await result
File "/usr/src/homeassistant/homeassistant/components/climate/__init__.py", line 422, in async_set_fan_mode
await self.hass.async_add_executor_job(self.set_fan_mode, fan_mode)
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/zhimodbus/climate.py", line 428, in set_fan_mode
self.set_mode(self._fan_modes, REG_FAN_MODE, fan_mode)
AttributeError: 'ZhiModbusClimate' object has no attribute '_fan_modes'
下面是我的配置信息:
climate:
- platform: zhimodbus
name: [影音厅, 负一楼, 三楼书房]
#风速设定:1低速,2中速,3高速,4自动
fan_modes: { 自动: 4, 一档: 1, 二档: 2, 三档: 3 }
#模式设定:1制热,3制冷,9通风
hvac_modes: { 'off': 0, cool: 3, heat: 1, fan_only: 9 }
#设定温度
target_temperature: { registers: [1, 601, 901], register_type: holding, scale: 0.1 }
#室内当前温度
temperature: { registers: [0, 600, 900], register_type: holding, scale: 0.1 }
#风速设定
fan_mode: { registers: [5, 605, 905], register_type: holding }
#模式设定
hvac_mode: { registers: [3, 603, 903], register_type: holding }
#开关控制
hvac_off: { registers: [2, 602, 902], register_type: holding }
|
|