# Core and integrations > Python, core, and the integration platform. An area of Home Assistant Contributors, the contributor site of Home Assistant. The index of the whole site is at https://contributors.home-assistant.io/llms.txt. The links below go to the Markdown version of each page, in the order of the sidebar. The full text of every page of this area is in https://contributors.home-assistant.io/core/llms-full.txt. ## Core and integrations - [Core and integrations](https://contributors.home-assistant.io/core/index.md): Python, core, and the integration platform. Everything you need to build and improve integrations, and to work on Home Assistant Core itself. - [Your first contribution to core](https://contributors.home-assistant.io/core/first-contribution/index.md): Set up a development environment, find something small to fix, and open your first pull request to Home Assistant Core. ## Development workflow - [Development workflow](https://contributors.home-assistant.io/core/development/index.md): How code gets from your machine into a Home Assistant release. The environment, the tools, the checks, and the review process. ### Write code - [Set up your development environment](https://contributors.home-assistant.io/core/development/environment/index.md): Get a working Home Assistant Core development setup, with the development container or a manual install on Linux, macOS, or Windows. - [Code style](https://contributors.home-assistant.io/core/development/style/index.md): The style rules for Python in Home Assistant Core. Formatting, docstrings, logging, error handling, and the conventions reviewers look for. - [Type hints](https://contributors.home-assistant.io/core/development/typing/index.md): How Home Assistant Core uses type hints and mypy, and how to opt a module in to strict checking. - [Running the tests](https://contributors.home-assistant.io/core/development/testing/index.md): Run the tests of Home Assistant Core with pytest, check your coverage, update snapshots, and know what CI runs. - [Writing tests](https://contributors.home-assistant.io/core/development/tests/index.md): How the tests of an integration are organized, how to test through Home Assistant instead of around it, and how to use fixtures, mocks, and snapshots. - [Linters, hassfest, and CI](https://contributors.home-assistant.io/core/development/checks/index.md): The checks that run on every commit and every pull request to Home Assistant Core, and how to run them yourself. - [Validating input](https://contributors.home-assistant.io/core/development/input-validation/index.md): Validate what users give your integration with probatio schemas and the helpers in config_validation, in config flows, actions, and YAML. ### Pull requests - [Development checklist](https://contributors.home-assistant.io/core/development/checklist/index.md): Check your change against this list before you commit, so your pull request is ready for review. - [Submitting a pull request](https://contributors.home-assistant.io/core/development/submitting/index.md): What is specific to pull requests for Home Assistant Core, from branches and commit messages to the template, new integrations, and dependency updates. - [After you open a pull request](https://contributors.home-assistant.io/core/development/review-process/index.md): What happens after you open a pull request to Home Assistant Core, and what you can do to help it along. - [Keeping your branch up to date](https://contributors.home-assistant.io/core/development/catching-up/index.md): Bring the latest changes from the dev branch of Home Assistant Core into your branch, and resolve conflicts. - [Reviewing pull requests](https://contributors.home-assistant.io/core/development/reviewing/index.md): A practical guide to reviewing pull requests on Home Assistant Core. What to check first, what to look for per type of change, and how to give feedback. - [Tips and tricks](https://contributors.home-assistant.io/core/development/tips/index.md): Smaller things that make working on Home Assistant Core easier, from stacking pull requests to testing a change on your own system. ### Changing behavior - [Deprecating](https://contributors.home-assistant.io/core/development/deprecating/index.md): How to remove or change behavior in Home Assistant Core without breaking homes overnight. Deprecation periods, repair issues, and the helpers for developer facing APIs. - [Versioning](https://contributors.home-assistant.io/core/development/versioning/index.md): How Home Assistant Core versions are built up, from stable releases to betas, nightlies, and development versions. - [Labs preview features](https://contributors.home-assistant.io/core/development/labs/index.md): Ship a finished feature that people can opt into through Home Assistant Labs, collect feedback, and graduate it to standard. ## Building integrations - [Building integrations](https://contributors.home-assistant.io/core/integrations/index.md): Everything an integration is made of, from the manifest and the config flow to fetching data, discovery, and diagnostics. ### Getting started - [How an integration fits in](https://contributors.home-assistant.io/core/integrations/concepts/index.md): The handful of ideas every integration is built from, in plain language, with links to the pages that go deeper. - [Build your first integration](https://contributors.home-assistant.io/core/integrations/tutorial/index.md): Build a small, complete integration step by step, from the scaffold to a config flow, a coordinator, sensors, tests, and a pull request that meets the Bronze tier. - [Build a Python library](https://contributors.home-assistant.io/core/integrations/api-library/index.md): Why integrations talk to devices through a separate library, what the library must meet, and how to structure authentication and data models. - [Create an integration](https://contributors.home-assistant.io/core/integrations/create/index.md): Generate a new integration with the scaffold script, and learn what the smallest possible integration looks like. - [Integration file structure](https://contributors.home-assistant.io/core/integrations/file-structure/index.md): The files of an integration, what each one does, and where Home Assistant looks for integrations. ### Setup and configuration - [Config entries](https://contributors.home-assistant.io/core/integrations/config-entries/index.md): How a config entry is set up, unloaded, removed, and migrated, and where your integration keeps its runtime data. - [Config flow](https://contributors.home-assistant.io/core/integrations/config-flow/index.md): Let users add your integration from the UI with a config flow, and make sure the same device is never set up twice. - [Forms, menus, and progress](https://contributors.home-assistant.io/core/integrations/flow-steps/index.md): The building blocks of config flows, options flows, and repair flows, from forms and sections to menus, external steps, and progress. - [Options flow](https://contributors.home-assistant.io/core/integrations/options-flow/index.md): Let users change how your integration behaves after setup, and reload it when they do. - [Config subentries](https://contributors.home-assistant.io/core/integrations/subentries/index.md): Split a config entry into parts users add one by one, like the locations of a weather service. - [Reauthentication and reconfiguration](https://contributors.home-assistant.io/core/integrations/reauth-reconfigure/index.md): Let users fix expired credentials and change connection details of an existing config entry, without removing and adding it again. - [OAuth 2.0 and application credentials](https://contributors.home-assistant.io/core/integrations/oauth2/index.md): Link a user's account at a cloud service with OAuth 2.0, and let Home Assistant handle the tokens for you. - [YAML configuration](https://contributors.home-assistant.io/core/integrations/yaml/index.md): When an integration may still be configured in configuration.yaml, and how Home Assistant validates that configuration. - [Setup failures and exceptions](https://contributors.home-assistant.io/core/integrations/setup-failures/index.md): Retry setup when a device is offline, start reauthentication when credentials fail, and raise the right exceptions in actions. ### Data and updates - [Fetching data](https://contributors.home-assistant.io/core/integrations/fetching-data/index.md): Get data from your device or service with polling or push, and share it between entities with the data update coordinator. - [Events in integrations](https://contributors.home-assistant.io/core/integrations/events/index.md): Make events of your devices available to users, and react to what happens inside Home Assistant with the event helpers. - [Get the instance URL](https://contributors.home-assistant.io/core/integrations/instance-url/index.md): Find a URL that a device, a service, or the browser of the user can reach Home Assistant on. ### Discovery - [Discovery](https://contributors.home-assistant.io/core/integrations/discovery/index.md): How Home Assistant finds your devices on the network, over USB, or over Bluetooth, and hands them to your config flow. - [Network discovery](https://contributors.home-assistant.io/core/integrations/network-discovery/index.md): Use the zeroconf, SSDP, DHCP, USB, MQTT, and network APIs of Home Assistant to find devices while your integration runs. - [Bluetooth integrations](https://contributors.home-assistant.io/core/integrations/bluetooth/index.md): Best practices for integrations that use Bluetooth, and the API of the Bluetooth integration. - [Fetching Bluetooth data](https://contributors.home-assistant.io/core/integrations/bluetooth-data/index.md): Pick the right coordinator for a Bluetooth device, and turn its advertisements into entities. ### Devices and registries - [Device registry](https://contributors.home-assistant.io/core/integrations/device-registry/index.md): Register the devices of your integration, link them to hubs, split products into child devices, and let users remove devices. - [Entity registry](https://contributors.home-assistant.io/core/integrations/entity-registry/index.md): Look up the entities of your integration in the entity registry, and migrate them when their unique IDs change. - [Area registry](https://contributors.home-assistant.io/core/integrations/area-registry/index.md): What Home Assistant knows about areas, and how your integration can suggest one for a device. ### Integration features - [Actions in integrations](https://contributors.home-assistant.io/core/integrations/actions/index.md): Register actions that users call from automations, scripts, and dashboards, describe them in services.yaml, and return response data. - [Triggers and conditions](https://contributors.home-assistant.io/core/integrations/triggers-and-conditions/index.md): Provide automation triggers and conditions from your integration with a trigger and condition platform, and name them so users can predict them. - [Device automations](https://contributors.home-assistant.io/core/integrations/device-automations/index.md): How device triggers, conditions, and actions work, for the integrations that already have them. - [Diagnostics](https://contributors.home-assistant.io/core/integrations/diagnostics/index.md): Let users download the data of a config entry or device, so they can share it when they report a problem, without leaking secrets. - [System health](https://contributors.home-assistant.io/core/integrations/system-health/index.md): Show the state of your integration on the system information page, like whether the server can be reached and how much quota is left. - [Repairs](https://contributors.home-assistant.io/core/integrations/repairs/index.md): Tell users about problems they need to act on, and help them fix those problems with a repair flow. - [Asking for a restart](https://contributors.home-assistant.io/core/integrations/restart-required/index.md): Tell Home Assistant it needs a restart to apply a change, without raising a repair issue. - [Reproduce state](https://contributors.home-assistant.io/core/integrations/reproduce-state/index.md): Make scenes work with the entities of your entity integration, by turning a stored state back into action calls. - [Significant change](https://contributors.home-assistant.io/core/integrations/significant-change/index.md): Tell integrations that export data, like voice assistants, which state changes of your entity type matter. - [Backup](https://contributors.home-assistant.io/core/integrations/backup/index.md): Add a backup agent that stores Home Assistant backups somewhere, or prepare your integration for a backup. - [Media source](https://contributors.home-assistant.io/core/integrations/media-source/index.md): Expose browsable, searchable, and playable media from your integration in the media browser of Home Assistant. ### Reference - [The integration manifest](https://contributors.home-assistant.io/core/integrations/manifest/index.md): Every key of manifest.json, what it does, and which values it accepts. - [Integration brands and images](https://contributors.home-assistant.io/core/integrations/brands/index.md): Add the icon and logo of your integration, and group integrations of one brand so users find them. - [Integration translations](https://contributors.home-assistant.io/core/integrations/translations/index.md): Every section of an integration's strings.json, how references and placeholders work, and how custom integrations ship their own translations. - [Integration categories](https://contributors.home-assistant.io/core/integrations/categories/index.md): The categories people browse integrations by, and how to pick the right ones for your integration. ## Entities - [Entities](https://contributors.home-assistant.io/core/entities/index.md): How entities work in Home Assistant Core, and a reference for every entity platform, from sensors and lights to voice and AI. ### Basics - [The entity class](https://contributors.home-assistant.io/core/entities/entity-class/index.md): The Entity base class every entity builds on, the three ways to set its properties, and the generic properties every entity has. - [Naming entities](https://contributors.home-assistant.io/core/entities/naming/index.md): How has_entity_name, translation keys, and device classes give your entities a name, and how Home Assistant turns that into a friendly name and an entity ID. - [Updating state](https://contributors.home-assistant.io/core/entities/state-updates/index.md): Keep an entity in sync with its device by polling or by push, write the state at the right moment, and report availability honestly. - [Entity lifecycle](https://contributors.home-assistant.io/core/entities/lifecycle/index.md): What happens when Home Assistant adds and removes an entity, and the hooks you use to subscribe, clean up, and react to registry changes. - [State and attributes](https://contributors.home-assistant.io/core/entities/state-attributes/index.md): What ends up in the state object of your entity, when to add extra attributes, and how to keep attributes out of the history. - [Icons](https://contributors.home-assistant.io/core/entities/icons/index.md): Give your entities icons that follow their state with icon translations in icons.json, and when to use the icon property instead. - [The entity registry](https://contributors.home-assistant.io/core/entities/registry/index.md): Give entities a unique ID so the entity registry can remember them, link them to a device, and decide whether they start enabled, visible, or categorized. ### Sensors and status - [Air quality entity](https://contributors.home-assistant.io/core/entities/air-quality/index.md): The deprecated air quality entity, and what to use instead. - [Binary sensor entity](https://contributors.home-assistant.io/core/entities/binary-sensor/index.md): Report something that is either on or off, like a door that is open or motion that is detected. - [Calendar entity](https://contributors.home-assistant.io/core/entities/calendar/index.md): Expose a calendar with events that have a start and an end, and optionally let users create, update, and delete them. - [Device tracker entity](https://contributors.home-assistant.io/core/entities/device-tracker/index.md): Report where a device is, either by its position or by whether it is connected to a network or beacon. - [Event entity](https://contributors.home-assistant.io/core/entities/event/index.md): Turn things that happen in the physical world, like a button press or a doorbell ring, into an entity you can automate on. - [Geolocation entity](https://contributors.home-assistant.io/core/entities/geo-location/index.md): Show events from an external feed that have a location, like earthquakes or wildfires, on the map. - [Sensor entity](https://contributors.home-assistant.io/core/entities/sensor/index.md): Report a read-only value, like a temperature, a power reading, or a timestamp, with its unit, and opt in to long-term statistics. - [Weather entity](https://contributors.home-assistant.io/core/entities/weather/index.md): Report the current weather conditions and serve daily, hourly, or twice daily forecasts. ### Lights and climate - [Climate entity](https://contributors.home-assistant.io/core/entities/climate/index.md): Build a climate entity for thermostats, air conditioners, and heat pumps that control temperature, humidity, and fans. - [Fan entity](https://contributors.home-assistant.io/core/entities/fan/index.md): Build a fan entity that controls speed, direction, oscillation, and preset modes. - [Humidifier entity](https://contributors.home-assistant.io/core/entities/humidifier/index.md): Build a humidifier entity for devices that add moisture to the air or remove it. - [Light entity](https://contributors.home-assistant.io/core/entities/light/index.md): Build a light entity that turns on and off, dims, and changes color or color temperature. - [Water heater entity](https://contributors.home-assistant.io/core/entities/water-heater/index.md): Build a water heater entity for boilers and tanks that heat water to a target temperature. ### Openings and security - [Alarm control panel entity](https://contributors.home-assistant.io/core/entities/alarm-control-panel/index.md): Build an alarm control panel entity that arms, disarms, and triggers a security system. - [Cover entity](https://contributors.home-assistant.io/core/entities/cover/index.md): Build a cover entity for blinds, shades, garage doors, gates, and other things that open and close. - [Lock entity](https://contributors.home-assistant.io/core/entities/lock/index.md): Build a lock entity for smart locks that lock, unlock, and optionally open a door. - [Siren entity](https://contributors.home-assistant.io/core/entities/siren/index.md): Build a siren entity for sirens and chimes that sound with a tone, a volume, and a duration. - [Valve entity](https://contributors.home-assistant.io/core/entities/valve/index.md): Build a valve entity for devices that control the flow of water or gas. ### Media - [Camera entity](https://contributors.home-assistant.io/core/entities/camera/index.md): Show still images from a camera, and optionally a live stream over HLS or WebRTC. - [Image entity](https://contributors.home-assistant.io/core/entities/image/index.md): Show a still image that changes now and then, like a map, a snapshot, or a QR code. - [Media player entity](https://contributors.home-assistant.io/core/entities/media-player/index.md): Control anything that plays audio or video, from a smart speaker to a TV or an AV receiver. ### Remotes and signals - [Infrared entity](https://contributors.home-assistant.io/core/entities/infrared/index.md): Share infrared hardware between integrations, so one integration sends and receives the signals and another one knows what they mean. - [Radio frequency entity](https://contributors.home-assistant.io/core/entities/radio-frequency/index.md): Share RF transmitters and receivers between integrations, so one integration owns the radio and another one knows the codes of a device. - [Remote entity](https://contributors.home-assistant.io/core/entities/remote/index.md): Send commands to other devices, like the buttons on a universal remote, and switch between activities. ### Voice and AI - [AI task entity](https://contributors.home-assistant.io/core/entities/ai-task/index.md): Build an AI task entity that lets automations ask a model to generate data or images, or to evaluate questions. - [Assist satellite entity](https://contributors.home-assistant.io/core/entities/assist-satellite/index.md): Build an Assist satellite entity for a device that listens for voice commands and speaks the response. - [Conversation entity](https://contributors.home-assistant.io/core/entities/conversation/index.md): Build a conversation agent that takes text from Assist and answers it, with or without a language model behind it. - [Speech-to-text entity](https://contributors.home-assistant.io/core/entities/stt/index.md): Build a speech-to-text entity that turns a stream of audio into text for Assist. - [Text-to-speech entity](https://contributors.home-assistant.io/core/entities/tts/index.md): Build a text-to-speech entity that turns text into audio, in one go or streamed as a language model writes it. - [Wake word detection entity](https://contributors.home-assistant.io/core/entities/wake-word/index.md): Build a wake word entity that listens to a stream of audio and reports when someone says the wake word. ### Appliances - [Lawn mower entity](https://contributors.home-assistant.io/core/entities/lawn-mower/index.md): Build a lawn mower entity for a robot mower that mows, pauses, and returns to its dock. - [Update entity](https://contributors.home-assistant.io/core/entities/update/index.md): Build an update entity that tells users a new firmware or software version is available, and lets them install it. - [Vacuum entity](https://contributors.home-assistant.io/core/entities/vacuum/index.md): Build a vacuum entity for a robot vacuum that cleans, docks, and can clean specific areas of the home. ### Inputs and helpers - [Button entity](https://contributors.home-assistant.io/core/entities/button/index.md): Build a button entity that triggers a single action on a device or service, like a restart. - [Date entity](https://contributors.home-assistant.io/core/entities/date/index.md): Build a date entity that lets people set a calendar date on a device, like the start of a holiday mode. - [Date and time entity](https://contributors.home-assistant.io/core/entities/datetime/index.md): Build a date and time entity that lets people set a moment in time on a device, like when a charging session starts. - [Notify entity](https://contributors.home-assistant.io/core/entities/notify/index.md): Build a notify entity that sends messages to a device or service, like a chat, an email address, or a display. - [Number entity](https://contributors.home-assistant.io/core/entities/number/index.md): Build a number entity that lets people set a numeric value on a device, like a target level or a timeout. - [Scene entity](https://contributors.home-assistant.io/core/entities/scene/index.md): Build a scene entity for a scene that lives on a device or hub, so people can activate it from Home Assistant. - [Select entity](https://contributors.home-assistant.io/core/entities/select/index.md): Build a select entity that lets people pick one option from a fixed list, like an operating mode. - [Switch entity](https://contributors.home-assistant.io/core/entities/switch/index.md): Build a switch entity for something you can turn on and off, like a relay or a smart plug. - [Text entity](https://contributors.home-assistant.io/core/entities/text/index.md): Build a text entity that lets people set a short text value on a device, like a display message or a network name. - [Time entity](https://contributors.home-assistant.io/core/entities/time/index.md): Build a time entity that lets people set a time of day on a device, like a wake-up time. - [To-do list entity](https://contributors.home-assistant.io/core/entities/todo/index.md): Build a to-do list entity for a shopping list, a task list, or any other ordered list of items with a status. ## Integration quality scale - [Integration quality scale](https://contributors.home-assistant.io/core/quality-scale/index.md): The tiers and rules that describe how good an integration is, how an integration earns a tier, and how to move it up. - [Tiers](https://contributors.home-assistant.io/core/quality-scale/tiers/index.md): What Bronze, Silver, Gold, and Platinum mean, and the tiers outside the scale, like internal and legacy. - [All rules](https://contributors.home-assistant.io/core/quality-scale/rules/index.md): Every rule of the integration quality scale per tier, with a checklist to copy into your pull request. - [Raise the tier of an integration](https://contributors.home-assistant.io/core/quality-scale/raise-tier/index.md): Work your way up the quality scale one rule at a time, and get the new tier reviewed and released. - [The quality scale file](https://contributors.home-assistant.io/core/quality-scale/quality-scale-file/index.md): The format of quality_scale.yaml, and the hassfest, pylint, and review checks that keep an integration honest about its rules. ### Bronze - [Register actions in async_setup](https://contributors.home-assistant.io/core/quality-scale/action-setup/index.md): Bronze rule action-setup: actions are registered when the integration loads, not per config entry. - [Poll at an appropriate interval](https://contributors.home-assistant.io/core/quality-scale/appropriate-polling/index.md): Bronze rule appropriate-polling: a polling integration uses an interval that fits its data. - [Provide brand assets](https://contributors.home-assistant.io/core/quality-scale/brands/index.md): Bronze rule brands: the integration has a logo and icon in the brands repository. - [Put common patterns in common modules](https://contributors.home-assistant.io/core/quality-scale/common-modules/index.md): Bronze rule common-modules: the coordinator lives in coordinator.py and the base entity in entity.py. - [Set up from the UI with a config flow](https://contributors.home-assistant.io/core/quality-scale/config-flow/index.md): Bronze rule config-flow: the integration is set up from the UI, with a clear config flow that stores its data in the right place. - [Test the config flow fully](https://contributors.home-assistant.io/core/quality-scale/config-flow-test-coverage/index.md): Bronze rule config-flow-test-coverage: the config flow has full test coverage, including recovery from errors. - [Use transparent dependencies](https://contributors.home-assistant.io/core/quality-scale/dependency-transparency/index.md): Bronze rule dependency-transparency: dependencies are open source, on PyPI, and built and published in public CI. - [Document the actions](https://contributors.home-assistant.io/core/quality-scale/docs-actions/index.md): Bronze rule docs-actions: the documentation describes the actions of the integration. - [Document the conditions](https://contributors.home-assistant.io/core/quality-scale/docs-conditions/index.md): Bronze rule docs-conditions: the documentation describes the conditions of the integration. - [Describe the brand, product, or service](https://contributors.home-assistant.io/core/quality-scale/docs-high-level-description/index.md): Bronze rule docs-high-level-description: the documentation describes what the integration connects to. - [Document the installation](https://contributors.home-assistant.io/core/quality-scale/docs-installation-instructions/index.md): Bronze rule docs-installation-instructions: the documentation has step-by-step setup instructions, with prerequisites. - [Document how to remove the integration](https://contributors.home-assistant.io/core/quality-scale/docs-removal-instructions/index.md): Bronze rule docs-removal-instructions: the documentation explains how to remove the integration. - [Document the triggers](https://contributors.home-assistant.io/core/quality-scale/docs-triggers/index.md): Bronze rule docs-triggers: the documentation describes the triggers of the integration. - [Subscribe to events in the entity lifecycle](https://contributors.home-assistant.io/core/quality-scale/entity-event-setup/index.md): Bronze rule entity-event-setup: entities subscribe in async_added_to_hass and unsubscribe when removed. - [Give entities a unique ID](https://contributors.home-assistant.io/core/quality-scale/entity-unique-id/index.md): Bronze rule entity-unique-id: every entity has a unique ID, so users can customize it. - [Use has_entity_name](https://contributors.home-assistant.io/core/quality-scale/has-entity-name/index.md): Bronze rule has-entity-name: entities set has_entity_name to True, and are named in context of their device. - [Store runtime data in runtime_data](https://contributors.home-assistant.io/core/quality-scale/runtime-data/index.md): Bronze rule runtime-data: runtime data is stored in ConfigEntry.runtime_data, with a typed config entry. - [Test the connection in the config flow](https://contributors.home-assistant.io/core/quality-scale/test-before-configure/index.md): Bronze rule test-before-configure: the config flow tests the connection before it creates the entry. - [Check the connection during setup](https://contributors.home-assistant.io/core/quality-scale/test-before-setup/index.md): Bronze rule test-before-setup: setup checks that it works, and raises the right exception when it does not. - [Prevent duplicate config entries](https://contributors.home-assistant.io/core/quality-scale/unique-config-entry/index.md): Bronze rule unique-config-entry: the same device or service cannot be set up twice. ### Silver - [Raise exceptions when actions fail](https://contributors.home-assistant.io/core/quality-scale/action-exceptions/index.md): Silver rule action-exceptions: actions raise ServiceValidationError or HomeAssistantError when they fail. - [Support unloading the config entry](https://contributors.home-assistant.io/core/quality-scale/config-entry-unloading/index.md): Silver rule config-entry-unloading: the integration can be unloaded and reloaded without a restart. - [Document the options](https://contributors.home-assistant.io/core/quality-scale/docs-configuration-parameters/index.md): Silver rule docs-configuration-parameters: the documentation describes every option of the options flow. - [Document the setup parameters](https://contributors.home-assistant.io/core/quality-scale/docs-installation-parameters/index.md): Silver rule docs-installation-parameters: the documentation describes every field asked for during setup. - [Mark entities unavailable when appropriate](https://contributors.home-assistant.io/core/quality-scale/entity-unavailable/index.md): Silver rule entity-unavailable: entities become unavailable when the device or service cannot be reached. - [Have an integration owner](https://contributors.home-assistant.io/core/quality-scale/integration-owner/index.md): Silver rule integration-owner: the integration has at least one integration owner. - [Log once when unavailable, and once when back](https://contributors.home-assistant.io/core/quality-scale/log-when-unavailable/index.md): Silver rule log-when-unavailable: the integration logs a lost connection once, and once when it comes back. - [Set the number of parallel updates](https://contributors.home-assistant.io/core/quality-scale/parallel-updates/index.md): Silver rule parallel-updates: every entity platform sets PARALLEL_UPDATES. - [Reauthenticate from the UI](https://contributors.home-assistant.io/core/quality-scale/reauthentication-flow/index.md): Silver rule reauthentication-flow: users can enter new credentials without removing the integration. - [Test more than 95% of the code](https://contributors.home-assistant.io/core/quality-scale/test-coverage/index.md): Silver rule test-coverage: the tests cover more than 95% of every module of the integration. ### Gold - [Create devices](https://contributors.home-assistant.io/core/quality-scale/devices/index.md): Gold rule devices: entities are grouped in devices, with complete device information. - [Implement diagnostics](https://contributors.home-assistant.io/core/quality-scale/diagnostics/index.md): Gold rule diagnostics: users can download diagnostics, with sensitive data redacted. - [Support discovery](https://contributors.home-assistant.io/core/quality-scale/discovery/index.md): Gold rule discovery: devices are discovered, so users do not have to look them up. - [Update network information from discovery](https://contributors.home-assistant.io/core/quality-scale/discovery-update-info/index.md): Gold rule discovery-update-info: discovery updates the address of a known device when it changes. - [Document how data is updated](https://contributors.home-assistant.io/core/quality-scale/docs-data-update/index.md): Gold rule docs-data-update: the documentation explains how and how often data is updated. - [Document automation examples](https://contributors.home-assistant.io/core/quality-scale/docs-examples/index.md): Gold rule docs-examples: the documentation gives automation examples or blueprints. - [Document known limitations](https://contributors.home-assistant.io/core/quality-scale/docs-known-limitations/index.md): Gold rule docs-known-limitations: the documentation lists the known limitations. - [Document supported devices](https://contributors.home-assistant.io/core/quality-scale/docs-supported-devices/index.md): Gold rule docs-supported-devices: the documentation lists known supported and unsupported devices. - [Document supported functionality](https://contributors.home-assistant.io/core/quality-scale/docs-supported-functions/index.md): Gold rule docs-supported-functions: the documentation describes the entities and functionality it provides. - [Document troubleshooting](https://contributors.home-assistant.io/core/quality-scale/docs-troubleshooting/index.md): Gold rule docs-troubleshooting: the documentation helps users solve common problems themselves. - [Document use cases](https://contributors.home-assistant.io/core/quality-scale/docs-use-cases/index.md): Gold rule docs-use-cases: the documentation shows what you can do with the integration. - [Add new devices automatically](https://contributors.home-assistant.io/core/quality-scale/dynamic-devices/index.md): Gold rule dynamic-devices: devices that appear after setup are added without a reload. - [Assign entity categories](https://contributors.home-assistant.io/core/quality-scale/entity-category/index.md): Gold rule entity-category: configuration and diagnostic entities have an entity category. - [Use device classes](https://contributors.home-assistant.io/core/quality-scale/entity-device-class/index.md): Gold rule entity-device-class: entities use a device class wherever one fits. - [Disable noisy or less popular entities](https://contributors.home-assistant.io/core/quality-scale/entity-disabled-by-default/index.md): Gold rule entity-disabled-by-default: entities that few users need are disabled by default. - [Translate entity names](https://contributors.home-assistant.io/core/quality-scale/entity-translations/index.md): Gold rule entity-translations: entity names come from strings.json, so they can be translated. - [Translate exception messages](https://contributors.home-assistant.io/core/quality-scale/exception-translations/index.md): Gold rule exception-translations: errors shown to users come from strings.json, so they can be translated. - [Use icon translations](https://contributors.home-assistant.io/core/quality-scale/icon-translations/index.md): Gold rule icon-translations: entity icons are defined in icons.json. - [Reconfigure from the UI](https://contributors.home-assistant.io/core/quality-scale/reconfiguration-flow/index.md): Gold rule reconfiguration-flow: users can change the setup of an entry without removing it. - [Raise repair issues when the user needs to act](https://contributors.home-assistant.io/core/quality-scale/repair-issues/index.md): Gold rule repair-issues: the integration raises repair issues for problems users can fix. - [Remove stale devices](https://contributors.home-assistant.io/core/quality-scale/stale-devices/index.md): Gold rule stale-devices: devices that are gone are removed, or can be removed by the user. ### Platinum - [Use an async dependency](https://contributors.home-assistant.io/core/quality-scale/async-dependency/index.md): Platinum rule async-dependency: the library of the integration uses asyncio. - [Pass in the web session](https://contributors.home-assistant.io/core/quality-scale/inject-websession/index.md): Platinum rule inject-websession: the library accepts the web session of Home Assistant. - [Use strict typing](https://contributors.home-assistant.io/core/quality-scale/strict-typing/index.md): Platinum rule strict-typing: the integration is fully typed and checked with strict mypy settings. ## How core works - [How core works](https://contributors.home-assistant.io/core/internals/index.md): The inside of Home Assistant Core. The hass object, events, states, asyncio, authentication, the APIs, and the voice and AI building blocks. ### The core - [The hass object in Python](https://contributors.home-assistant.io/core/internals/hass/index.md): The HomeAssistant instance that every integration gets, what hangs off it, and the core configuration on hass.config. - [The event bus](https://contributors.home-assistant.io/core/internals/events/index.md): How the event bus works, how to fire your own events, and how to listen for events without leaking listeners. - [States](https://contributors.home-assistant.io/core/internals/states/index.md): How the state machine keeps the current state of every entity, what a state object holds, and why integrations write states through entities. - [The action registry](https://contributors.home-assistant.io/core/internals/actions/index.md): How the action registry works underneath, what an action handler gets, and how to call actions from code. ### Async - [Async in Home Assistant](https://contributors.home-assistant.io/core/internals/asyncio/index.md): Why Home Assistant runs on one asyncio event loop, the kinds of functions you write, and how to move work in and out of the loop. - [Thread safety](https://contributors.home-assistant.io/core/internals/thread-safety/index.md): Which API to call when your code runs outside the event loop, and how to fix the thread safety errors Home Assistant reports. - [Blocking operations](https://contributors.home-assistant.io/core/internals/blocking-operations/index.md): How to keep blocking I/O and slow imports out of the event loop, and how to fix the blocking calls Home Assistant reports. ### Authentication - [How authentication works](https://contributors.home-assistant.io/core/internals/auth/index.md): Users, groups, credentials, and tokens in Home Assistant, and the auth providers and multi-factor modules that verify who someone is. - [Permissions](https://contributors.home-assistant.io/core/internals/permissions/index.md): How permission policies are structured and merged, and how to check them in actions, HTTP views, and WebSocket commands. - [Authentication API](https://contributors.home-assistant.io/core/internals/auth-api/index.md): How an app logs in to a Home Assistant instance with OAuth 2, refreshes and revokes tokens, and makes authenticated requests. ### APIs - [REST API](https://contributors.home-assistant.io/core/internals/rest-api/index.md): The HTTP endpoints under /api/ to read states, call actions, fire events, and render templates, with the permissions each one needs. - [WebSocket API](https://contributors.home-assistant.io/core/internals/websocket-api/index.md): The API the frontend uses. How a connection works, the core commands, error handling, and how to add your own commands from an integration. - [Instance discovery](https://contributors.home-assistant.io/core/internals/instance-discovery/index.md): How Home Assistant announces itself on the local network with Zeroconf, so apps can find it without asking for an address. - [Modbus devices](https://contributors.home-assistant.io/core/internals/modbus/index.md): How to write a library for a Modbus device with modbus-connection, and how your integration shares one Modbus connection with others. - [LoRaWAN devices](https://contributors.home-assistant.io/core/internals/lorawan/index.md): How a connection integration registers a LoRaWAN network server, and how a device integration finds and exposes the devices on it. ### Voice and AI - [Intents](https://contributors.home-assistant.io/core/internals/intents/index.md): What an intent is, how an integration handles intents, and how to fire one from code or over HTTP. - [Built-in intent handlers](https://contributors.home-assistant.io/core/internals/built-in-intents/index.md): Where the handlers of the intents Home Assistant ships with live in Core, how they find their entities, and where to look up every intent and its slots. - [Conversation API](https://contributors.home-assistant.io/core/internals/conversation-api/index.md): Send text to a conversation agent over the REST or WebSocket API, and read the response it gives back. - [Assist pipelines](https://contributors.home-assistant.io/core/internals/assist-pipelines/index.md): How voice flows through Home Assistant, and how to run an Assist pipeline over the WebSocket API, stream audio into it, and follow its events. - [LLM API](https://contributors.home-assistant.io/core/internals/llm-api/index.md): How Home Assistant exposes tools to large language models, how an integration contributes tools or a whole API, and how APIs are served over MCP.