请选择 进入手机版 | 继续访问电脑版

『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 277|回复: 3

[技术探讨] smartIR控制空调一直无法开启

[复制链接]

4

主题

113

帖子

387

积分

中级会员

Rank: 3Rank: 3

积分
387
金钱
274
HASS币
0
发表于 2019-7-12 17:13:56 | 显示全部楼层 |阅读模式
HA:0.92.2smartIR:
博联broadlink pro

遇到的问题:1、同时配置了空调、风扇、电视, 风扇和电视控制都没问题,打开关闭,调风速等设置都没问题。 2、唯独空调打开有问题,如果直接打开空调会报下面的错误。3、空调可以直接调成制冷、制热、自动等模式,风速调整也都没问题,唯独就是打开空调控制不了。不知道是什么原因, 还请哪位大神多多指教。

这是我得目录结构:

smartir/
├── climate.py
├── codes
│   ├── climate
│   │   └── 1181.json
│   ├── fan
│   │   └── 1020.json
│   └── media_player
│       └── 1040.json
├── controller.py
├── fan.py
├── __init__.py
├── manifest.json
├── media_player.py
├── __pycache__
│   ├── climate.cpython-35.pyc
│   ├── controller.cpython-35.pyc
│   ├── fan.cpython-35.pyc
│   ├── __init__.cpython-35.pyc
│   └── media_player.cpython-35.pyc
└── services.yaml

5 directories, 15 files


这是配置文件信息:

空调的代码
- platform: smartir
  name: keting_ac
  unique_id: keting_ac
  device_code: 1181
  controller_data: 192.168.88.166
  temperature_sensor: sensor.temperature
  humidity_sensor: sensor.humidity


风扇的代码:
  1. - platform: smartir
  2.   name: kayee_fan
  3.   unique_id: kayee_fan
  4.   device_code: 1020
  5.   controller_data: 192.168.88.166
复制代码电视机的代码:
- platform: smartir name: lg_tv unique_id: lg_tv device_code: 1040 controller_data: 192.168.88.166
复制代码
电视机的代码:
复制代码


错误信息:
'low'
Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/components/websocket_api/commands.py", line 121, in handle_call_service
    connection.context(msg))
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/core.py", line 1138, in async_call
    self._execute_service(handler, service_call))
  File "/usr/lib/python3.5/asyncio/futures.py", line 380, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 304, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/core.py", line 1160, in _execute_service
    await handler.func(service_call)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/entity_component.py", line 194, in handle_service
    required_features
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py", line 316, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/lib/python3.5/asyncio/futures.py", line 293, in result
    raise self._exception
  File "/usr/lib/python3.5/asyncio/tasks.py", line 239, in _step
    result = coro.send(None)
  File "/usr/local/lib/python3.5/dist-packages/homeassistant/helpers/service.py", line 337, in _handle_service_platform_call
    await getattr(entity, func)(**data)
  File "/home/pi/.homeassistant/custom_components/smartir/climate.py", line 313, in async_turn_on
    await self.async_set_operation_mode(self._last_on_operation)
  File "/home/pi/.homeassistant/custom_components/smartir/climate.py", line 295, in async_set_operation_mode
    await self.send_command()
  File "/home/pi/.homeassistant/custom_components/smartir/climate.py", line 327, in send_command
    command = self._commands[operation_mode][fan_mode][target_temperature]
KeyError: 'low'
调用服务 climate/turn_on 失败。 'low'


回复

使用道具 举报

2

主题

75

帖子

279

积分

中级会员

Rank: 3Rank: 3

积分
279
金钱
204
HASS币
0
发表于 2019-7-17 14:20:04 | 显示全部楼层
貌似也碰到过这种问题,换个码库或自己录码试试。
我的好久没折腾了,今晚回去搞搞。
回复

使用道具 举报

2

主题

125

帖子

370

积分

论坛分享达人

积分
370
金钱
245
HASS币
0
发表于 2019-7-17 14:38:45 | 显示全部楼层
学下一下打开空调的码录入试试
回复

使用道具 举报

0

主题

14

帖子

59

积分

注册会员

Rank: 2

积分
59
金钱
45
HASS币
0
发表于 2019-7-30 16:49:02 | 显示全部楼层
学习一下~~~~~~~~~~~~~~~~~~
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2019-10-19 20:08 , Processed in 0.080872 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表