Skip to content

Squeezebox: Only flag media position as updated when it really has changed#13737

Merged
balloob merged 1 commit intohome-assistant:devfrom
molobrakos:squeezebox-mediaposition-fix
Apr 9, 2018
Merged

Squeezebox: Only flag media position as updated when it really has changed#13737
balloob merged 1 commit intohome-assistant:devfrom
molobrakos:squeezebox-mediaposition-fix

Conversation

@molobrakos
Copy link
Copy Markdown
Contributor

Description:

To prevent logs, database, etc to be spammed with state updates, the media_position_updated_at property should only change when the media position has in fact changed.

This is analogous to e.g. https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/media_player/vlc.py#L72

Related issue (if applicable): fixes #

Pull request in home-assistant.github.io with documentation (if applicable): home-assistant/home-assistant.github.io#<home-assistant.github.io PR number goes here>

Example entry for configuration.yaml (if applicable):

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • New dependencies have been added to the REQUIREMENTS variable (example).
  • New dependencies are only imported inside functions that use them (example).
  • New dependencies have been added to requirements_all.txt by running script/gen_requirements_all.py.
  • New files were added to .coveragerc.

If the code does not interact with devices:

  • Tests have been added to verify that the new code works.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line too long (89 > 79 characters)

@molobrakos molobrakos force-pushed the squeezebox-mediaposition-fix branch from 3fdc55f to d4edbe6 Compare April 7, 2018 09:32
@molobrakos molobrakos changed the title Squeezebox: Only flag media position as updated when it really has Squeezebox: Only flag media position as updated when it really has changed Apr 7, 2018
Copy link
Copy Markdown
Member

@syssi syssi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@balloob balloob merged commit 8beb9c2 into home-assistant:dev Apr 9, 2018
@molobrakos molobrakos deleted the squeezebox-mediaposition-fix branch April 10, 2018 10:09
@balloob balloob mentioned this pull request Apr 27, 2018
Adminiuga pushed a commit to Adminiuga/home-assistant that referenced this pull request Jun 25, 2018
@home-assistant home-assistant locked and limited conversation to collaborators Jul 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants