Integration Quality Scale: Chapter 3 #1155
-
Integration Quality Scale: Chapter 3So after reading and taking in all feedback on the first two chapters, we've come to a proposal for the integration quality scale. The current scaleCurrently, we have 4 scaled tiers: no score, silver, gold and platinum. The description of the current tiers is as follows: No scoreThis integration passes the bare minimum requirements to become part of the index.
Silver 🥈This integration is able to cope when things go wrong. It will not print any exceptions nor will it fill the log with retry attempts.
Gold 🥇This is a solid integration that is able to survive poor conditions and can be configured via the user interface.
Platinum 🏆Best of the best. The integration is completely async, meaning it's super fast. Integrations that reach platinum level will require approval by the code owner for each PR.
As can be seen, the old scale is outdated. The proposed scaleSo the scale I want to propose has a few endpoints we want to address:
The scaled tiersThe proposed scale has 4 scaled tiers, bronze, silver, gold, and platinum. 🥉 BronzeThe bronze tier is the baseline standard and requirement for all new integrations. It meets the minimum requirements in code quality, functionality, and user experience. It complies with the fundamental expectations and provides a reliable foundation for users to interact with their devices and services. The documentation provides guidelines for setting up the integration directly from the Home Assistant user interface. From a technical perspective, this integration has been reviewed to comply with all baseline standards, which we require for all new integrations, including automated tests for setting up the integration. Characteristics:
🥈 SilverThe silver tier builds upon the “Bronze” level by improving the reliability and robustness of integrations, ensuring a solid runtime experience. It ensures an integration handles errors properly, such as when authentication to a device or service fails, handles offline devices, and other errors. The documentation for these integrations provides information on what is available in Home Assistant when this integration is used, as well as troubleshooting information when issues occur. This integration has one or more active code owners who help maintain it to ensure the experience on this level lasts now and in the future. Characteristics:
🥇 GoldThe gold standard in integration user experience, providing extensive and comprehensive support for the integrated devices & services. A gold-tier integration aims to be user-friendly, fully featured, and accessible to a wider audience. When possible, devices are automatically discovered for an easy and seamless setup, and their firmware/software can be directly updated from Home Assistant. All provided devices and entities are named logically and fully translatable, and they have been properly categorized and enabled for long-term statistical use. The documentation for these integrations is extensive, and primarily aimed toward end-users and understandable by non-technical consumers. Besides providing general information on the integration, the documentation provides possible example use cases, a list of compatible devices, a list of described entities the integration provides, and extensive descriptions and usage examples of available actions provided by the integration. The use of example automations, dashboards, available Blueprints, and links to additional external resources, is highly encouraged as well. The integration provides means for debugging issues, including downloading diagnostic information and documenting troubleshooting instructions. If needed, the integration can be reconfigured via the UI. From a technical perspective, the integration needs to have full automated test coverage of its codebase to ensure the set integration quality is maintained now and in the future. All integrations that have devices in the Works with Home Assistant program are at least required to have this tier. Characteristics:
🏆 PlatinumPlatinum is the highest tier an integration can reach, the epitome of quality within Home Assistant. It not only provides the best user experience but also achieves technical excellence by adhering to the highest standards, supreme code quality, and well-optimized performance and efficiency. Characteristics:
The non-scaled tiersIn addition to the new 4 scaled tiers, we will also have 4 non-scaled tiers. ❓ No scoreThese integrations can be set up through the Home Assistant user interface. The “No score” designation doesn’t imply that they are bad or buggy, instead, it indicates that they haven’t been assessed according to the quality scale or that they need some maintenance to reach the now-considered minimum “Bronze” standard. The “No score” tier cannot be assigned to new integrations, as they are required to have at least a “Bronze” level when introduced. The Home Assistant project encourages the community to help updating these integrations without a score to meet at least the “Bronze” level requirements. Characteristics:
🏠 InternalThis tier is assigned to integrations used internally by Home Assistant. These integrations provide basic components and building blocks for Home Assistant's core program or for other integrations to build on top of it. Everything in Home Assistant is extendable using integrations. In fact, Home Assistant uses its own integration logic to extend base functionality. For example, the automation engine of Home Assistant is an integration. Those internal parts are thus marked with this “Internal” tier. Internal integrations are maintained by the Home Assistant project and subjected to strict architectural design procedures. Characteristics:
💾 LegacyLegacy integrations are older integrations that have been part of Home Assistant for many years, possibly since its inception. They can only be configured through YAML files and often lack active maintainers (code owners). These integrations might be complex to set up and do not adhere to current/modern end-user expectations in their use and features. The Home Assistant project encourages the community to help migrate these integrations to the UI and update them to meet modern standards, making these integrations accessible to everyone. Characteristics:
📦 CustomCustom integrations are developed and distributed by the community, and offer additional functionalities and support for devices and services to Home Assistant. These integrations are not included in the official Home Assistant releases and can be installed manually or via third-party tools like HACS (Home Assistant Community Store). The Home Assistant project does not review, security audit, maintain, or support third-party custom integrations. Users are encouraged to exercise caution and review the custom integration’s source and community feedback before installation. Developers are encouraged and invited to contribute their custom integration to the Home Assistant project by aligning them with the integration quality scale and submitting them for inclusion. Characteristics:
Rationale behind the newly added tiersThe new bronze tierWe introduced the bronze tier as the baseline standard for all new integrations. The legacy tierWe introduced the legacy tier to differentiate between integrations that are not graded and ones that lie far below the current standards. The custom tierWe introduced the custom tier to make sure that every integration has a place on the scale. Works with Home AssistantSince Home Assistant is getting more and more popular, more manufacturers are interested in integrating their devices with Home Assistant. The rulebookThe above clearly defines the purpose of each tier. The scaled tiers are bound to a set of rules, that need to be satisfied in order to fit into that tier. This chapter is aimed a listing all rules tied to each tier. 🥉 Bronze
🥈 Silver
🥇 Gold
🏆 Platinum
Adjusting the scaleSince we never really had rules around adjusting the scale or an integration tier, I would like to propose the following rules for adjusting the scale. Adjusting the tier of an integrationHome Assistant encourages our contributors to get their integrations to the highest possible tier, to provide an excellent coding experience for our contributors and the best experience for our users. When an integration reaches the minimum requirements for a certain tier, a contributor can open a pull request to adjust the scale for the integration. This request needs to be accompanied by the full checklist for each rule of scale (including all rules of lower tiers), demonstrating that it has met those requirements. Once the Home Assistant core team reviews and approves it, the integration will display the new tier as of the next major release of Home Assistant. Besides upgrading integration to a higher tier on the scale, it is also possible for an integration to be downgraded to a lower tier. This can, for example, happen when there is no longer an active integration code owner. In this specific example, the integration will be downgraded to “Bronze,” even if it otherwise fully complies with the “Platinum” tier. Adjustments to rules contained in each tierThe world of IoT and all technologies used by Home Assistant are changing at a fast pace. Not just in terms of what Home Assistant can support or do, but also the software Home Assistant is built upon is constantly innovated. Home Assistant is truly pioneering the technology in the industry at a fast pace. This also means that new insights and newly developed and adopted best practices will occur over time, resulting in new additions and improvements to the individual integration quality scale rules. If a tier is adjusted, all integrations in that tier need to be re-evaluated and adjusted accordingly. One exception to this is integrations that have devices that are part of the Works with Home Assistant program. Those integrations will be flagged as grandfathered into their existing tier. So what now?Once this proposal is accepted, a few things will happen:
I would love to hear if you agree with this proposal; as we would love to move forward with all the rest of the implementation steps 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 18 comments 28 replies
-
As I've been there while it was written, I've reviewed it at this point 😄 I agree with the current proposal and framework. I think it is a major leap forward, and it sets clear goals on each of the scaled tiers but also provides tiers for the ones not fitting the scale. More importantly, it is making the user experience more central. 👍 ✅ Approved from my end. |
Beta Was this translation helpful? Give feedback.
-
Overall looks solid. 👍 from me. Consider moving 028 to gold or lower as not doing so has been the cause of blocking I/O in the event loop to create SSL context, and some other major performance problems with creating a new session every time. |
Beta Was this translation helpful? Give feedback.
-
For Otherwise, no further comments. ✅ 👍 from me. |
Beta Was this translation helpful? Give feedback.
-
I like it, though I find 041 a bit strange.
Besides that, I'd like a copyable checklist/template, that is in a format we desire, so that quality scale PRs have a standardized format as well. |
Beta Was this translation helpful? Give feedback.
-
Is there documentation of the process on how to get an integration graded? |
Beta Was this translation helpful? Give feedback.
-
Should we still use the term "code owner" or maybe to lately introduced "integration owner" 🤔 🙈 |
Beta Was this translation helpful? Give feedback.
-
If I get it right it seems all helpers should be marked Otherwise 👍 from me. |
Beta Was this translation helpful? Give feedback.
-
Maybe this is rare case, but where would the alert integrate fall? It's definitely legacy since it's YAML-only, but from a few discussions I've had it's also not something we want to move to the UI or work on further. The word "legacy" to me say that it isn't something that's going to be maintained further. However, it sounds like how legacy is defined here is mostly meant for YAML-only integrations? Perhaps another category like "deprecated" could be useful if there are enough other integrations like this? |
Beta Was this translation helpful? Give feedback.
-
If accepted, would all open PRs to adjust quality scale have to be redone as well? See home-assistant/core#125932 |
Beta Was this translation helpful? Give feedback.
-
Great work @joostlek, just a couple of suggestions which may or may have not been discussed previously:
|
Beta Was this translation helpful? Give feedback.
-
Looks very nice, well done. A few small remarks:
|
Beta Was this translation helpful? Give feedback.
-
On the platinum being rather empty, just a new thread to avoid mixing too many things together. One idea about the code quality, perhaps higher scale levels could also have some quality requirements for the test code? Not necessary from the get go, but something that could push towards the best practices (parametrize, mock properly), avoid c&p tests, use facilities provided by the core, etc. given maintaining test code is also part of good code hygiene. |
Beta Was this translation helpful? Give feedback.
-
I would like to suggest to add an "if possible" to "003 - Don't allow the same device or service to be able to be set up twice". Some services or hubs (eg. the one integrated via |
Beta Was this translation helpful? Give feedback.
-
If you all are ready and want to test run this, then I'm offering an unrated integration, Enphase-envoy, to go through the process and identify the practical side of this. |
Beta Was this translation helpful? Give feedback.
-
Looks good to me! Minor point: I think 048 should be present tense ('describes' rather than 'described'). Suggestion: The only other thing I would consider is potentially adding some expectations on the dependency library at the gold/platinum level, e.g. whether it is actively maintained, pinned dependencies, API strict typing and perhaps test coverage. We rightly push for business logic to be in these libraries rather than HA, but beyond that, the bar is quite low. Observation: I think there is a task management/responsibility challenge on the upgrading/downgrading of tier ratings by PR. Since there is no obvious tangible advantage to having an integration labelled as e.g. gold vs silver, some will probably be left in the wrong category when they should change. Additionally with stale integration owners, there is no real incentive or person to notice inactivity and downgrade them. We may have to accept that the reported quality tier will lag the reality to some extent. Automation would help with this. The ideal for me would be for the scale to motivate developers automatically (e.g. "you are 78% of the way to achieving silver status"), rather than being an additional thing we are asking them to do by self-assessment. But those are just side points, and do not affect the proposed scale/rules which I 100% agree with. Great job @joostlek! |
Beta Was this translation helpful? Give feedback.
-
Looks good, super nice work @joostlek ! |
Beta Was this translation helpful? Give feedback.
-
The proposal, as provided in the current OP, has been accepted. Meaning we can continue with setting up everything that is needed to get this new scale out the door 👍 ../Frenck |
Beta Was this translation helpful? Give feedback.
-
The scale is live! https://developers.home-assistant.io/docs/core/integration-quality-scale/ |
Beta Was this translation helpful? Give feedback.
The proposal, as provided in the current OP, has been accepted. Meaning we can continue with setting up everything that is needed to get this new scale out the door 👍
../Frenck