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
Deprecate legacy Proximity entity #108730
Deprecate legacy Proximity entity #108730
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a merge conflict.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
9a02276
to
4d19c38
Compare
2024.6 (Breaking change "words") or 2024.8 (in picture)? |
oops ... this change was postponed multiple times ... i've corrected the breaking change message |
Not to slow down this update, but I thought we had to add config flow to any integration before updating things. |
nevertheless, you can change things/integrations without the need of migrating to a config flow, except changes on yaml based parameters (see ADR 7) |
DOMAIN, | ||
f"deprecated_proximity_entity_{friendly_name}", | ||
breaks_in_ha_version="2024.8.0", | ||
is_fixable=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues like these should be fixable and persistent so that the user can fix them when they've updated their automations and scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this should be persistent (the issue is re-created as long as these automations and/or scripts exists on ever HA reboot), nor that we can implement a automatic fix for that 🤔
further as soon as is_fixable=True
is set, the description is not shown anymore (already tried to clear browser cache)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to put the strings as part of a repair flow in the strings.json.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, i got it work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to create a repair flow. A default repair flow will be created for us. Just write the strings like so:
core/homeassistant/components/calendar/strings.json
Lines 112 to 124 in 195ef6d
"issues": { | |
"deprecated_service_calendar_list_events": { | |
"title": "Detected use of deprecated service `calendar.list_events`", | |
"fix_flow": { | |
"step": { | |
"confirm": { | |
"title": "[%key:component::calendar::issues::deprecated_service_calendar_list_events::title%]", | |
"description": "Use `calendar.get_events` instead which supports multiple entities.\n\nPlease replace this service and adjust your automations and scripts and select **submit** to close this issue." | |
} | |
} | |
} | |
} | |
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but this default repair flow will not do any re-check if the issue is really fixed, or do i oversee something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's correct. The user will fix it manually, hopefully after they have updated their automations and scripts. We'll create the issue again though, the next time they start Home Assistant if we detect automations or scripts with an entity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this makes it quiet simpler to implement 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Breaking change
The proximity entity is deprecated (will be removed in 2024.8). It is superseded by sensor entities.
For each tracked person or device one sensor for the distance and the direction of travel to/from the monitored zone is created. Further for each Proximity configuration one sensor which shows the nearest device or person to the monitored zone is created.
With this you can use the Min/Max integration to determine the nearest and furthest distance.
Proposed change
This is the deprecation of the legacy Proximity entity, after sensor entities has been implemented (#101497)
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: