Skip to content

Add name option for Frontier Silicon devices#32085

Merged
springstan merged 5 commits into
home-assistant:devfrom
jezcooke:FSAddNameOption
Feb 23, 2020
Merged

Add name option for Frontier Silicon devices#32085
springstan merged 5 commits into
home-assistant:devfrom
jezcooke:FSAddNameOption

Conversation

@jezcooke
Copy link
Copy Markdown
Contributor

@jezcooke jezcooke commented Feb 22, 2020

Sometimes on start-up the component seems to be asked for the name before async_update has got it from the API resulting in the media_player becoming ‘unnamed_device’ thus ends up with a different entity ID breaking automations/Lovelace cards etc. that refer to it (and not looking good of course).

Others have reported the same issue, e.g. #18556

Breaking change

Proposed change

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

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

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

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 🥈 Silver
  • 🥇 Gold
  • 🏆 Platinum

…yaml

Sometimes on start-up the component seems to be asked for the name before async_update has got it from the API resulting in the media_player becoming ‘unnamed_device’ thus ends up with a different entity ID breaking automations/Lovelace cards etc. that refer to it (and not looking good of course).

Others have reported the same issue, e.g. home-assistant#18556
@jezcooke jezcooke changed the title Added option to specify the name of the device in configuration.yaml Added option to specify the name of Frontier Silicon devices Feb 22, 2020
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 22, 2020

Codecov Report

Merging #32085 into dev will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev   #32085      +/-   ##
==========================================
+ Coverage   94.71%   94.72%   +0.01%     
==========================================
  Files         766      767       +1     
  Lines       55568    55479      -89     
==========================================
- Hits        52630    52553      -77     
+ Misses       2938     2926      -12
Impacted Files Coverage Δ
homeassistant/components/zha/lock.py 88.33% <0%> (-2.21%) ⬇️
homeassistant/components/ring/config_flow.py 76.19% <0%> (-2.08%) ⬇️
homeassistant/components/zha/switch.py 94.33% <0%> (-1.19%) ⬇️
homeassistant/components/zha/cover.py 92.94% <0%> (-1%) ⬇️
homeassistant/components/zha/binary_sensor.py 95.45% <0%> (-0.8%) ⬇️
homeassistant/components/zha/fan.py 96.92% <0%> (-0.55%) ⬇️
homeassistant/components/zha/device_tracker.py 97.95% <0%> (-0.46%) ⬇️
homeassistant/components/fido/sensor.py 100% <0%> (ø) ⬆️
homeassistant/components/uk_transport/sensor.py 94.2% <0%> (ø) ⬆️
homeassistant/components/meraki/device_tracker.py 93.75% <0%> (ø) ⬆️
... and 20 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ce710f1...92baf9b. Read the comment docs.

@springstan springstan changed the title Added option to specify the name of Frontier Silicon devices Add name option for Frontier Silicon devices Feb 22, 2020
Copy link
Copy Markdown
Member

@springstan springstan left a comment

Choose a reason for hiding this comment

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

LGTM 👍 just one suggestion:

Comment thread homeassistant/components/frontier_silicon/media_player.py Outdated
Comment thread homeassistant/components/frontier_silicon/media_player.py Outdated
Comment thread homeassistant/components/frontier_silicon/media_player.py Outdated
Co-Authored-By: springstan <46536646+springstan@users.noreply.github.com>
@springstan springstan merged commit 458e47f into home-assistant:dev Feb 23, 2020
@lock lock Bot locked and limited conversation to collaborators Feb 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants