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

AttributeError #66

Open
robertoleonardo opened this issue Sep 24, 2024 · 2 comments
Open

AttributeError #66

robertoleonardo opened this issue Sep 24, 2024 · 2 comments

Comments

@robertoleonardo
Copy link

Please type any relevant information here

started getting this error today on multiple machines. i did get a new iphone recently but the plugins been working fine for a few days since adding it to my HA so i don't think that's the issue despite the error mentioning iphone. unclear why this happened all of a sudden in the last few hours though, i don't think ha was updated or anything in that time

Trace Log

Traceback (most recent call last):
  File "C:\Users\RJL\AppData\Roaming\FlowLauncher\Plugins\HA-Commander-5.2.0\lib\flox\launcher.py", line 41, in run
    results = request_method(*request_parameters) or self._results
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\RJL\AppData\Roaming\FlowLauncher\Plugins\HA-Commander-5.2.0\lib\flox\__init__.py", line 132, in _query
    self.query(query)
  File "C:\Users\RJL\AppData\Roaming\FlowLauncher\Plugins\HA-Commander-5.2.0\plugin\main.py", line 53, in query
    states = self.client.states()
             ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\RJL\AppData\Roaming\FlowLauncher\Plugins\HA-Commander-5.2.0\plugin\homeassistant.py", line 122, in states
    entities.append(self.create_entity(entity))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\RJL\AppData\Roaming\FlowLauncher\Plugins\HA-Commander-5.2.0\plugin\homeassistant.py", line 147, in create_entity
    return _cls(self, entity)
           ^^^^^^^^^^^^^^^^^^
  File "C:\Users\RJL\AppData\Roaming\FlowLauncher\Plugins\HA-Commander-5.2.0\plugin\homeassistant.py", line 328, in __init__
    getattr(self, current_source).icon = "radiobox-marked"
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'MediaPlayer' object has no attribute 'iPhone'

@robertoleonardo
Copy link
Author

sorry - disregard this. a re-install seems to fix the issue. odd that it happened on both machines and was so simply to fix, but whatever - it works now :)

@Gh0stExp10it
Copy link
Contributor

Might be also fixed by #68
If the source_list does not contain an attribute of the current_source, the MediaPlayer view cannot visually display which attribute is currently "active". This seems to happen more frequently with third-party plugins where the source is not permanently active in HA.
In short, no attribute can be marked as "active" that no longer appears in the MediaPlayer list.

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