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

Kodi component not recognizing play state correctly #14394

Closed
quthla opened this issue May 11, 2018 · 3 comments
Closed

Kodi component not recognizing play state correctly #14394

quthla opened this issue May 11, 2018 · 3 comments

Comments

@quthla
Copy link
Contributor

quthla commented May 11, 2018

Home Assistant release with the issue:

0.69

Last working Home Assistant release (if known):
none

Operating environment (Hass.io/Docker/Windows/etc.):

Ubuntu Python venv but was same with hass.io
Component/platform:

Description of problem:

Unfortunately my PR didn't fix the issue. At first it worked but now it's back to "normal".
The speed change event is correctly received from the webservice and then saved in self._properties['speed'] but for whatever reason self.async_schedule_update_ha_state(force_refresh) is not updating anything even with force_refresh = True

If I change the volume or stop playback via Kodi webinterface that is being instantly reflected in Home Assistant.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):

Traceback (if applicable):


Additional information:

@dshokouhi
Copy link
Member

When you create issues you should never clear out the issue template, always fill it in no matter what. All the data is important. This also appears be a duplicate of #11625

@quthla
Copy link
Contributor Author

quthla commented May 11, 2018

Everything but play status is correct. If I stop playback via Kodi webinterface it is correctly displayed.

So no duplicate.

@quthla
Copy link
Contributor Author

quthla commented May 12, 2018

I found the issue.

    @property
    def state(self):
        """Return the state of the device."""
        if self._players is None:
            return STATE_OFF

        if not self._players:
            return STATE_IDLE

        if self._properties['speed'] == 0 and not self._properties['live']:
            return STATE_PAUSED

        return STATE_PLAYING

I watch live tv but I can pause that so the condition is never true because it assumes live can't be paused.

How do we proceed from here? Drop the second part of the condition?

@quthla quthla closed this as completed Jul 3, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Oct 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants