Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

插件导致 Home Assistant 日志里持续报错 #55

Open
EricCorleone opened this issue Jul 3, 2024 · 2 comments
Open

插件导致 Home Assistant 日志里持续报错 #55

EricCorleone opened this issue Jul 3, 2024 · 2 comments

Comments

@EricCorleone
Copy link

大佬你好,首先插件是可以正常使用的,但是在日志里却持续不断地报错:

2024-07-03 15:01:21.189 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_cloud_music/media_player.py", line 71, in media_player_interval
    mp.interval(now)
  File "/config/custom_components/ha_cloud_music/media_player.py", line 111, in interval
    media_player = self.media_player
                   ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_cloud_music/media_player.py", line 152, in media_player
    return self.hass.states.get(self.source_media_player)
           ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'states'

麻烦帮忙看一下是怎么回事,谢谢

@shaonianzhentan
Copy link
Owner

大佬你好,首先插件是可以正常使用的,但是在日志里却持续不断地报错:

2024-07-03 15:01:21.189 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved (None)
Traceback (most recent call last):
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_cloud_music/media_player.py", line 71, in media_player_interval
    mp.interval(now)
  File "/config/custom_components/ha_cloud_music/media_player.py", line 111, in interval
    media_player = self.media_player
                   ^^^^^^^^^^^^^^^^^
  File "/config/custom_components/ha_cloud_music/media_player.py", line 152, in media_player
    return self.hass.states.get(self.source_media_player)
           ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'states'

麻烦帮忙看一下是怎么回事,谢谢

HA什么版本?

@EricCorleone
Copy link
Author

当时应该是2024.7.0,不过后来解决了,貌似是因为我添加了两个智能音箱设备,然后又禁用了其中一个导致的,我后来把禁用的那个在设备筛选那里去掉了就好了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants