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

Migrate AVM FRITZ!Box Call monitor to has entity name #99752

Merged

Conversation

jrieger
Copy link
Contributor

@jrieger jrieger commented Sep 6, 2023

Proposed change

Migrate AVM FRITZ!Box Call monitor to has entity name

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)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

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
  • I have followed the perfect PR recommendations
  • 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.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.
  • Untested files have been added to .coveragerc.

To help with the load of incoming pull requests:

@jrieger jrieger requested a review from cdce8p as a code owner September 6, 2023 17:19
homeassistant/components/fritzbox_callmonitor/strings.json Outdated Show resolved Hide resolved
homeassistant/components/fritzbox_callmonitor/strings.json Outdated Show resolved Hide resolved
phonebook_id: int = config_entry.data[CONF_PHONEBOOK]
prefixes: list[str] | None = config_entry.options.get(CONF_PREFIXES)
serial_number: str = config_entry.data[SERIAL_NUMBER]
host: str = config_entry.data[CONF_HOST]
port: int = config_entry.data[CONF_PORT]

name = f"{fritzbox_phonebook.fph.modelname} Call Monitor {phonebook_name}"
Copy link
Member

Choose a reason for hiding this comment

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

This change would mean that none of the entities will have a phonebook name. Can one phone (which is what fritzbox_phonebook.fph.modelname is, I think) have more phonebooks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It can, you have to add another device and chose another phonebook there:
image

I did not find any information how to append the phonebook name to the entity name, though.

Copy link
Member

Choose a reason for hiding this comment

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

Currently we can't and there are some discussion on adding more variables to entity names. But I think with this change, you would get sensor.something_call_monitor and sensor.something_call_monitor_2 unless you rename the device.

Maybe @cdce8p has an idea for now without placeholders that would make this correct. Otherwise you might need to wait with this PR :(

Copy link
Contributor Author

@jrieger jrieger Sep 6, 2023

Choose a reason for hiding this comment

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

Yes, second one is sensor.fritz_box_7590_call_monitor_2.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed to use new translation placeholders.

homeassistant/components/fritzbox_callmonitor/sensor.py Outdated Show resolved Hide resolved
@jrieger jrieger marked this pull request as draft September 6, 2023 17:53
@home-assistant
Copy link

home-assistant bot commented Sep 7, 2023

Hey there @cdce8p, mind taking a look at this pull request as it has been labeled with an integration (fritzbox_callmonitor) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of fritzbox_callmonitor can trigger bot actions by commenting:

  • @home-assistant close Closes the pull request.
  • @home-assistant rename Awesome new title Renames the pull request.
  • @home-assistant reopen Reopen the pull request.
  • @home-assistant unassign fritzbox_callmonitor Removes the current integration label and assignees on the pull request, add the integration domain after the command.

@cdce8p
Copy link
Member

cdce8p commented Sep 7, 2023

@jrieger Could you rebase this PR?

@jrieger
Copy link
Contributor Author

jrieger commented Sep 7, 2023

Done.

@frenck frenck marked this pull request as ready for review November 29, 2023 21:53
@frenck frenck added the smash Indicator this PR is close to finish for merging or closing label Nov 30, 2023
@emontnemery
Copy link
Contributor

This PR should make use of #104453

@jbouwh jbouwh removed the smash Indicator this PR is close to finish for merging or closing label Dec 23, 2023
@joostlek
Copy link
Member

joostlek commented Jan 4, 2024

Aight, placeholders is merged. Now let's finish this one

@joostlek joostlek merged commit f2514c0 into home-assistant:dev Jan 4, 2024
23 checks passed
raman325 added a commit to raman325/home-assistant that referenced this pull request Jan 5, 2024
* upstream/dev: (2071 commits)
  Set zwave_js voltage sensor suggested precision (home-assistant#107116)
  Bump bluetooth-adapters to 0.17.0 (home-assistant#107195)
  Disable IPv6 in the opower integration to fix AEP utilities (home-assistant#107203)
  Fix conversation snapshots (home-assistant#107196)
  Report missing entities/areas instead of failing to match in Assist (home-assistant#107151)
  Bump to PyTado 0.17.3 (home-assistant#107181)
  Fix switch states in AVM FRITZ!Box Tools (home-assistant#107183)
  Fix tplink overloading power strips (home-assistant#104208)
  Update sensorpush-ble library to 1.6.1 (home-assistant#107168)
  Bump aiohomekit to 3.1.2 (home-assistant#107177)
  Introduce base entity in streamlabs water (home-assistant#107095)
  Clean up outdated entity replacement logic in Guardian (home-assistant#107160)
  Add conversation_id parameter to conversation.process service (home-assistant#106078)
  Pass aiohttp clientsession to tedee integration (home-assistant#107089)
  Update Home Assistant base image to 2024.01.0 - Python 3.12 (home-assistant#107175)
  Remove precision in streamlabs water (home-assistant#107096)
  Pass down language to hassil (home-assistant#106490)
  Use snapshots in Glances sensor tests (home-assistant#107159)
  Cache homekit_controller supported features (home-assistant#106702)
  Migrate AVM FRITZ!Box Call monitor to has entity name (home-assistant#99752)
  ...
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2024
@jrieger jrieger deleted the fritzbox_callmonitor_has_entity_name branch January 8, 2024 09:16
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.

None yet

6 participants