home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
69.03k stars 28.28k forks source link

Migrate file integration to config entry #116861

Closed jbouwh closed 1 week ago

jbouwh commented 1 week ago

Breaking change

The notify services for the file integration now require that the file path is an allowed path. Users should check the accessed file is in the allowlist_external_dirs to ensure their automation's keep working.

Proposed change

This PR will:

This PR prepares for another PR to open soon:

Screenshots

afbeelding

Final results after https://github.com/home-assistant/core/pull/117210 and https://github.com/home-assistant/core/pull/117215: afbeelding

afbeelding

Type of change

Additional information

Checklist

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

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

To help with the load of incoming pull requests:

home-assistant[bot] commented 1 week ago

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

Code owner commands Code owners of `file` 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 file` Removes the current integration label and assignees on the pull request, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the pull request. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the pull request.
gjohansson-ST commented 1 week ago

Too much for a single PR I think.

jbouwh commented 1 week ago

Too much for a single PR I think.

Yeah, I know. I'll see if I can pop some parts out.

gjohansson-ST commented 1 week ago

At least the change to config flow and the new NotifyEntity should be in different PRs but I didn't look too carefully so maybe there is something else too which can go into a preliminary PR

jbouwh commented 1 week ago

@gjohansson-ST I Have removed the implemention of the new entity platform. Disadvantage is that we cannot fase out the old service with the yaml clean up if the follow up PR is merged later. So now I need to use discovery to set up the legacy service from the entry data.

Will split up in 2 parts: 1: this PR to implement the config entry 2: a future PR to implement the new notify entity

home-assistant[bot] commented 1 week ago

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks :+1:

Learn more about our pull request process.

jbouwh commented 1 week ago

Thnx!

jbouwh commented 1 week ago

Follow up on late review: https://github.com/home-assistant/core/pull/117210