Giter VIP home page Giter VIP logo

Comments (10)

xrh0905 avatar xrh0905 commented on September 21, 2024

可以先更新到最新的HA版本试试?

from ha-dsair.

Helloookimi avatar Helloookimi commented on September 21, 2024

有个大佬看了下您的代码和我的错误,告诉我:是属于重启后再其次刷新空调列表的时候,因为没有新设备,所以这个变量返回空值,于是python就报错了。但不知道应该返回什么值才能让程序知道是没有新设备。(@static method def poll_status这部分)
然后根据这个思路我关闭了自动发现新设备以后,重启HA就不崩溃了,您看下是不是这个问题,或者说新版本HA也解决了这个问题呢?

from ha-dsair.

mypal avatar mypal commented on September 21, 2024

看起来不是新设备发现的问题。看上去像是你用的重启方法并没有完全重置Python的运行环境,有没有试过虚拟机彻底关闭再重启,这样会报错么?

from ha-dsair.

Helloookimi avatar Helloookimi commented on September 21, 2024

发现这个情况就是再虚拟机掉电后自动重启后出现的,现在最近调试有时候关闭虚拟机后,重启就肯定不行了,解决的办法禁用组件重启或者再ESXI中重启几次虚拟机又行了。。

from ha-dsair.

Helloookimi avatar Helloookimi commented on September 21, 2024

就是每一次重启基本上都会有这个问题,然后再多重启几次才可以让组件运行起来。

from ha-dsair.

xrh0905 avatar xrh0905 commented on September 21, 2024

Home-Assistant版本?

from ha-dsair.

Helloookimi avatar Helloookimi commented on September 21, 2024

作者您好,最近又重新部署了HA,ESXI虚拟机安装部署的HA9.5版本,在第一次添加组件时没有问题,能够正确识别所有设备,但是重启后又无法载入了,删除重新添加组件出现以下日志:
Logger: root
Source: custom_components/ds_air/ds_air_service/service.py:293
Integration: DS-AIR (documentation)
First occurred: 2023年2月27日 23:19:22 (2 occurrences)
Last logged: 09:55:17

Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/config/custom_components/ds_air/ds_air_service/service.py", line 135, in run
Service.poll_status()
File "/config/custom_components/ds_air/ds_air_service/service.py", line 293, in poll_status
for i in Service._new_aircons:
TypeError: 'NoneType' object is not iterable

from ha-dsair.

Helloookimi avatar Helloookimi commented on September 21, 2024

彻底关闭HAOS,再开机也是一样的问题

from ha-dsair.

Helloookimi avatar Helloookimi commented on September 21, 2024

重新部署了一个x86的haos9.5版本,同样问题,第一次提交的时候成功了,重启就不行了,再次添加也报错,再次添加时候出现以下错误:
Logger: aiohttp.server
Source: custom_components/ds_air/ds_air_service/service.py:205
Integration: DS-AIR (documentation)
First occurred: 21:42:35 (1 occurrences)
Last logged: 21:42:35

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_protocol.py", line 433, in _handle_request
resp = await request_handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_app.py", line 504, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.10/site-packages/aiohttp/web_middlewares.py", line 117, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 67, in security_filter_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 28, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 80, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 146, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 218, in post
return await super().post(request)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 72, in wrapper
result = await method(view, request, data, *args, **kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 71, in post
result = await self._flow_mgr.async_init(
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 233, in async_init
flow = await self.async_create_flow(handler, context=context, data=data)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1816, in async_create_flow
return HANDLERS[entry.domain].async_get_options_flow(entry)
File "/config/custom_components/ds_air/config_flow.py", line 81, in async_get_options_flow
return DsAirOptionsFlowHandler(config_entry)
File "/config/custom_components/ds_air/config_flow.py", line 93, in init
self._climates = list(map(lambda state: state.alias, Service.get_aircons()))
File "/config/custom_components/ds_air/ds_air_service/service.py", line 205, in get_aircons
return Service._new_aircons+Service._aircons+Service._bathrooms
TypeError: unsupported operand type(s) for +: 'NoneType' and 'NoneType'

Logger: root
Source: custom_components/ds_air/ds_air_service/service.py:293
Integration: DS-AIR (documentation)
First occurred: 21:43:38 (1 occurrences)
Last logged: 21:43:38

Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/config/custom_components/ds_air/ds_air_service/service.py", line 135, in run
Service.poll_status()
File "/config/custom_components/ds_air/ds_air_service/service.py", line 293, in poll_status
for i in Service._new_aircons:
TypeError: 'NoneType' object is not iterable

from ha-dsair.

mypal avatar mypal commented on September 21, 2024

#50 应该修掉这个问题了,可以取test分支代码试试看,没问题我发个版

from ha-dsair.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.