-
-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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
Entity for Tags #115048
Entity for Tags #115048
Conversation
Hey there @balloob, @dmulcahey, mind taking a look at this pull request as it has been labeled with an integration ( Code owner commandsCode owners of
|
86c9bcb
to
6dbbb87
Compare
b59521b
to
8620a53
Compare
8620a53
to
144aaa1
Compare
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
0460791
to
0e3151c
Compare
1cb93d3
to
bdc00a2
Compare
As discussed on discord, tag should have an entity component which manages the entity lifecycle. |
2030573
to
946d734
Compare
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.
Left to do:
- Bump store version to 1.2, where 1.2 does not store the name, and implement migration of names to entity registry
- Don't use
original_name
in entity registry, since the tags can't be named by the integrations scanning tags, only by users - Add tests which assert how data is stored, maybe create a couple of tags and compare store data with a snapshot
@coderabbitai review |
WalkthroughThe changes to the Home Assistant's Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant HomeAssistant
participant TagStore
participant WebSocket
User->>HomeAssistant: Initiate Tag Scan
HomeAssistant->>TagStore: Store Tag Data
TagStore-->>HomeAssistant: Confirm Storage
HomeAssistant->>WebSocket: Notify Tag Scanned
WebSocket-->>User: Display Tag Scanned Notification
sequenceDiagram
participant Dev
participant HomeAssistant
participant TagStore
Dev->>HomeAssistant: Trigger Migration
HomeAssistant->>TagStore: Migrate Data to New Version
TagStore-->>HomeAssistant: Confirm Migration
HomeAssistant-->>Dev: Display Migration Success
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
This is great, thanks a lot @gjohansson-ST 👍
Co-authored-by: Robert Resch <robert@resch.dev>
Proposed change
According to discussion in home-assistant/architecture#1069
This creates entities for tags (
tag.*
).Needs #118241 ✅
Fixes home-assistant/architecture#1069
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: