diff --git a/docs/core/entity/update.md b/docs/core/entity/update.md index e2ff4b56..7a2dd31b 100644 --- a/docs/core/entity/update.md +++ b/docs/core/entity/update.md @@ -37,9 +37,10 @@ Other properties that are common to all entities such as `device_class`, `entity | Constant | Description | |----------|--------------------------------------| | 'UpdateEntityFeature.BACKUP' | A backup can be made automatically, before installing an update. -| 'UpdateEntityFeature.INSTALL' | The update can be installed from Home Assistant. +| 'UpdateEntityFeature.INSTALL' | The update can be installed from Home Assistant. | 'UpdateEntityFeature.PROGRESS' | This integration is able to provide progress information. If omitted, Home Assistant will try to provide a progress status; although it is better if the progress can be extracted from the device or service API. | 'UpdateEntityFeature.SPECIFIC_VERSION' | A specific version of an update can be installed using the `update.install` service. +| 'UpdateEntityFeature.RELEASE_NOTES' | The entity provides methods to fetch a complete changelog. ## Methods @@ -75,6 +76,27 @@ class MyUpdate(UpdateEntity): """ ``` +### Release notes + +This method can be implemented so users can can get the full release notes in the more-info dialog of the Home Assistant Frontend before they install the update. + +The returned string can contain markdown, and the frontend will format that correctly. + +This method requires `UpdateEntityFeature.RELEASE_NOTES` to be set. + +```python +class MyUpdate(UpdateEntity): + # Implement one of these methods. + + def release_notes(self) -> str | None: + """Return the release notes.""" + return "Lorem ipsum" + + async def async_release_notes(self) -> str | None: + """Return the release notes.""" + return "Lorem ipsum" +``` + ### Available device classes Optionally specifies what type of entity it is.