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

 找回密码
 立即注册
查看: 424|回复: 4

[插件集成] peacefair_energy 修复版 for ha2025.1.0

[复制链接]

41

主题

2198

帖子

8528

积分

元老级技术达人

积分
8528
金钱
6315
HASS币
110
发表于 2025-1-15 08:53:57 | 显示全部楼层 |阅读模式
peacefair_energy.zip (25.29 KB, 下载次数: 32)
升级挂了4个集成,总算都修复了
好久没有这种升级挂好多的感觉了

评分

参与人数 1金钱 +12 收起 理由
隔壁的王叔叔 + 12 论坛有你更精彩!

查看全部评分

回复

使用道具 举报

4

主题

183

帖子

1606

积分

金牌会员

Rank: 6Rank: 6

积分
1606
金钱
1423
HASS币
0
发表于 2025-1-15 09:00:12 | 显示全部楼层
感谢大佬,系统还没升级,先准备着
回复

使用道具 举报

5

主题

271

帖子

2941

积分

金牌会员

Rank: 6Rank: 6

积分
2941
金钱
2670
HASS币
0
发表于 2025-1-15 10:21:01 | 显示全部楼层
必须点赞,挂了半个月了。
回复

使用道具 举报

4

主题

183

帖子

1606

积分

金牌会员

Rank: 6Rank: 6

积分
1606
金钱
1423
HASS币
0
发表于 2025-1-15 14:01:59 | 显示全部楼层
系统升级过了,替换了就好了,棒棒的!!
回复

使用道具 举报

13

主题

184

帖子

1399

积分

金牌会员

Rank: 6Rank: 6

积分
1399
金钱
1210
HASS币
20
发表于 4 天前 | 显示全部楼层
大佬,我升到最新版本,用不起了。。报错如下,能帮忙解决吗?感谢!


Core
版本
core-2025.2.5
最新版本
core-2025.2.5

Supervisor
版本
supervisor-2025.02.1
最新版本
supervisor-2025.02.1


日志记录器: homeassistant.setup
来源: setup.py:340
首次出现: 21:31:33 (1 次总计出现)
上次记录: 21:31:33

Setup failed for custom integration 'peacefair_energy': Unable to import component: cannot import name 'DEVICE_CLASS_ENERGY' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1015, in async_get_component
    comp = await self.hass.async_add_import_executor_job(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        self._get_component, True
        ^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/usr/local/lib/python3.13/concurrent/futures/thread.py", line 59, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/peacefair_energy_back/__init__.py", line 19, in <module>
    from homeassistant.const import (
    ...<6 lines>...
    )
ImportError: cannot import name 'DEVICE_CLASS_ENERGY' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 340, in _async_setup_component
    component = await integration.async_get_component()
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1035, in async_get_component
    self._component_future.result()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1027, in async_get_component
    comp = self._get_component()
  File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component
    ComponentProtocol, importlib.import_module(self.pkg_path)
                       ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/util/loop.py", line 201, in protected_loop_func
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.13/importlib/__init__.py", line 88, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 1026, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/config/custom_components/peacefair_energy_back/__init__.py", line 19, in <module>
    from homeassistant.const import (
    ...<6 lines>...
    )
ImportError: cannot import name 'DEVICE_CLASS_ENERGY' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)


日志记录器: homeassistant.util.loop
来源: util/loop.py:77
首次出现: 21:31:33 (1 次总计出现)
上次记录: 21:31:33

Detected blocking call to import_module with args ('custom_components.peacefair_energy_back',) in /usr/src/homeassistant/homeassistant/loader.py, line 1075: ComponentProtocol, importlib.import_module(self.pkg_path) inside the event loop; This is causing stability issues. Please create a bug report at https://github.com/home-assistan ... s%3Aopen+is%3Aissue For developers, please see https://developers.home-assistan ... ions/#import_module Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/usr/src/homeassistant/homeassistant/__main__.py", line 227, in <module> sys.exit(main()) File "/usr/src/homeassistant/homeassistant/__main__.py", line 213, in main exit_code = runner.run(runtime_conf) File "/usr/src/homeassistant/homeassistant/runner.py", line 154, in run return loop.run_until_complete(setup_and_run_hass(runtime_config)) File "/usr/local/lib/python3.13/asyncio/base_events.py", line 707, in run_until_complete self.run_forever() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 678, in run_forever self._run_once() File "/usr/local/lib/python3.13/asyncio/base_events.py", line 2033, in _run_once handle._run() File "/usr/local/lib/python3.13/asyncio/events.py", line 89, in _run self._context.run(self._callback, *self._args) File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in async_setup_component result = await _async_setup_component(hass, domain, config) File "/usr/src/homeassistant/homeassistant/setup.py", line 340, in _async_setup_component component = await integration.async_get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 1027, in async_get_component comp = self._get_component() File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _get_component ComponentProtocol, importlib.import_module(self.pkg_path)
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2025-3-6 12:01 , Processed in 0.058034 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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