Skip to content

Conversation

@mdegat01
Copy link
Collaborator

Proposed Changes

Add support for the addon availability API added in home-assistant/supervisor#6140

@mdegat01 mdegat01 requested a review from agners August 29, 2025 20:40
@mdegat01 mdegat01 added the new-feature New features or options. label Aug 29, 2025
@agners agners marked this pull request as draft September 4, 2025 12:05
@mdegat01 mdegat01 force-pushed the add-availability-api branch from 612c1b8 to 184d6da Compare September 4, 2025 20:21
@mdegat01 mdegat01 marked this pull request as ready for review September 4, 2025 20:23
Copy link
Collaborator

@agners agners left a comment

Choose a reason for hiding this comment

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

The key pretty much should be enough identifying information to derive the message from. I wonder if we should have made the message_template just a local, static field of the exception and not transmitted over the wire 🤔 .

Anyhow, it can come in handy to make small adjustments/improvements, and probably doesn't matter much that we transmit it over the wire.

@mdegat01
Copy link
Collaborator Author

mdegat01 commented Sep 8, 2025

@agners yea I agree. For some reason I thought I'd be reconstituting the message using the message template in the client library, that was why I added it. Then when doing the code here I realized that didn't make sense, I already had the message. Maybe I should drop the field from the client library for now? It already made the API but that doesn't mean it has to be added here if we don't need it.

@agners
Copy link
Collaborator

agners commented Sep 8, 2025

For some reason I thought I'd be reconstituting the message using the message template in the client library, that was why I added it.

You ended up using the template from what I can tell no? The message template is only in the fixtures, which tries to reflect what Supervisor returns.

Having the message template string on server side has the benefit that we can alter it. On the other hand it makes things more difficult for translations: Translators need to check Supervisor code to find the English original template 🤔 .

Copy link
Collaborator

@agners agners left a comment

Choose a reason for hiding this comment

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

This now aligns with latest Supervisor change where we removed message_template again (see home-assistant/supervisor#6205).

LGTM!

@mdegat01 mdegat01 force-pushed the add-availability-api branch from 41292e6 to 90c4f74 Compare September 23, 2025 15:18
@agners agners merged commit 954b75e into main Sep 23, 2025
12 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

new-feature New features or options.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants