Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.update.UpdateEntity Class Reference
Inheritance diagram for homeassistant.components.update.UpdateEntity:
[legend]
Collaboration diagram for homeassistant.components.update.UpdateEntity:
[legend]

Public Member Functions

None async_clear_skipped (self)
 
None async_install (self, str|None version, bool backup, **Any kwargs)
 
None async_install_with_progress (self, str|None version, bool backup)
 
None async_internal_added_to_hass (self)
 
str|None async_release_notes (self)
 
None async_skip (self)
 
bool auto_update (self)
 
UpdateDeviceClass|None device_class (self)
 
int display_precision (self)
 
EntityCategory|None entity_category (self)
 
str|None entity_picture (self)
 
bool|int|None in_progress (self)
 
None install (self, str|None version, bool backup, **Any kwargs)
 
str|None installed_version (self)
 
str|None latest_version (self)
 
str|None release_notes (self)
 
str|None release_summary (self)
 
str|None release_url (self)
 
str|None state (self)
 
dict[str, Any]|None state_attributes (self)
 
UpdateEntityFeature supported_features (self)
 
UpdateEntityFeature supported_features_compat (self)
 
str|None title (self)
 
int|float|None update_percentage (self)
 
bool version_is_newer (self, str latest_version, str installed_version)
 
- Public Member Functions inherited from homeassistant.helpers.restore_state.RestoreEntity
ExtraStoredData|None async_get_last_extra_data (self)
 
State|None async_get_last_state (self)
 
None async_internal_will_remove_from_hass (self)
 
ExtraStoredData|None extra_restore_state_data (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.Entity
None __init_subclass__ (cls, **Any kwargs)
 
str __repr__ (self)
 
None add_to_platform_abort (self)
 
None add_to_platform_finish (self)
 
None add_to_platform_start (self, HomeAssistant hass, EntityPlatform platform, asyncio.Semaphore|None parallel_updates)
 
bool assumed_state (self)
 
None async_added_to_hass (self)
 
None async_device_update (self, bool warning=True)
 
None async_on_remove (self, CALLBACK_TYPE func)
 
None async_registry_entry_updated (self)
 
None async_remove (self, *bool force_remove=False)
 
None async_removed_from_registry (self)
 
None async_schedule_update_ha_state (self, bool force_refresh=False)
 
None async_set_context (self, Context context)
 
None async_update_ha_state (self, bool force_refresh=False)
 
None async_will_remove_from_hass (self)
 
None async_write_ha_state (self)
 
str|None attribution (self)
 
bool available (self)
 
dict[str, Any]|None capability_attributes (self)
 
DeviceInfo|None device_info (self)
 
bool enabled (self)
 
bool entity_registry_enabled_default (self)
 
bool entity_registry_visible_default (self)
 
Mapping[str, Any]|None extra_state_attributes (self)
 
bool force_update (self)
 
HassJobType get_hassjob_type (self, str function_name)
 
er.EntityOptionsType|None get_initial_entity_options (self)
 
bool has_entity_name (self)
 
str|None icon (self)
 
str|UndefinedType|None name (self)
 
None schedule_update_ha_state (self, bool force_refresh=False)
 
bool should_poll (self)
 
str|None suggested_object_id (self)
 
str|None translation_key (self)
 
Mapping[str, strtranslation_placeholders (self)
 
str|None unique_id (self)
 
str|None unit_of_measurement (self)
 
bool use_device_name (self)
 
- Public Member Functions inherited from homeassistant.helpers.entity.CachedProperties
None __init__ (cls, str name, tuple[type,...] bases, dict[Any, Any] namespace, **Any kwargs)
 
Any __new__ (mcs, str name, tuple[type,...] bases, dict[Any, Any] namespace, set[str]|None cached_properties=None, **Any kwargs)
 

Public Attributes

 installed_version
 
- Public Attributes inherited from homeassistant.helpers.entity.Entity
 device_entry
 
 entity_id
 
 hass
 
 parallel_updates
 
 platform
 
 registry_entry
 

Static Public Attributes

 bool
 
 int
 
 None
 
 UpdateEntityFeature
 
- Static Public Attributes inherited from homeassistant.helpers.entity.Entity
 bool
 
 EntityPlatform
 
 HomeAssistant
 
 None
 
 StateInfo
 
 StateType
 
 str
 

Private Member Functions

bool _default_to_device_class_name (self)
 

Private Attributes

 __in_progress
 
 __skipped_version
 
 _attr_in_progress
 

Static Private Attributes

 _entity_component_unrecorded_attributes
 

Detailed Description

Representation of an update entity.

Definition at line 207 of file __init__.py.

Member Function Documentation

◆ _default_to_device_class_name()

bool homeassistant.components.update.UpdateEntity._default_to_device_class_name (   self)
private
Return True if an unnamed entity should be named by its device class.

For updates this is True if the entity has a device class.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 250 of file __init__.py.

◆ async_clear_skipped()

None homeassistant.components.update.UpdateEntity.async_clear_skipped (   self)
Clear the skipped version.

Definition at line 374 of file __init__.py.

◆ async_install()

None homeassistant.components.update.UpdateEntity.async_install (   self,
str | None  version,
bool  backup,
**Any   kwargs 
)
Install an update.

Version can be specified to install a specific version. When `None`, the
latest version needs to be installed.

The backup parameter indicates a backup should be taken before
installing the update.

Reimplemented in homeassistant.components.hassio.update.SupervisorAddonUpdateEntity, homeassistant.components.zwave_js.update.ZWaveNodeFirmwareUpdate, homeassistant.components.zha.update.ZHAFirmwareUpdateEntity, homeassistant.components.wled.update.WLEDUpdateEntity, homeassistant.components.unifi.update.UnifiDeviceUpdateEntity, homeassistant.components.tplink_omada.update.OmadaDeviceUpdate, homeassistant.components.tessie.update.TessieUpdateEntity, homeassistant.components.teslemetry.update.TeslemetryUpdateEntity, homeassistant.components.smlight.update.SmUpdateEntity, homeassistant.components.shelly.update.RpcUpdateEntity, homeassistant.components.shelly.update.RestUpdateEntity, homeassistant.components.reolink.update.ReolinkUpdateBaseEntity, homeassistant.components.rainmachine.update.RainMachineUpdateEntity, homeassistant.components.qnap_qsw.update.QswUpdate, homeassistant.components.openhome.update.OpenhomeUpdateEntity, homeassistant.components.netgear.update.NetgearUpdateEntity, homeassistant.components.mqtt.update.MqttUpdate, homeassistant.components.matter.update.MatterUpdate, homeassistant.components.litterrobot.update.RobotUpdateEntity, homeassistant.components.lamarzocco.update.LaMarzoccoUpdateEntity, homeassistant.components.hassio.update.SupervisorCoreUpdateEntity, homeassistant.components.hassio.update.SupervisorSupervisorUpdateEntity, homeassistant.components.hassio.update.SupervisorOSUpdateEntity, homeassistant.components.fritz.update.FritzBoxUpdateEntity, homeassistant.components.ezviz.update.EzvizUpdateEntity, homeassistant.components.esphome.update.ESPHomeUpdateEntity, homeassistant.components.esphome.update.ESPHomeDashboardUpdateEntity, homeassistant.components.devolo_home_network.update.DevoloUpdateEntity, and homeassistant.components.demo.update.DemoUpdate.

Definition at line 379 of file __init__.py.

◆ async_install_with_progress()

None homeassistant.components.update.UpdateEntity.async_install_with_progress (   self,
str | None  version,
bool   backup 
)
Install update and handle progress if needed.

Handles setting the in_progress state in case the entity doesn't
support it natively.

Definition at line 489 of file __init__.py.

◆ async_internal_added_to_hass()

None homeassistant.components.update.UpdateEntity.async_internal_added_to_hass (   self)
Call when the update entity is added to hass.

It is used to restore the skipped version, if any.

Reimplemented from homeassistant.helpers.restore_state.RestoreEntity.

Definition at line 509 of file __init__.py.

◆ async_release_notes()

str | None homeassistant.components.update.UpdateEntity.async_release_notes (   self)

◆ async_skip()

None homeassistant.components.update.UpdateEntity.async_skip (   self)
Skip the current offered version to update.

Definition at line 364 of file __init__.py.

◆ auto_update()

bool homeassistant.components.update.UpdateEntity.auto_update (   self)
Indicate if the device or service has auto update enabled.

Reimplemented in homeassistant.components.hassio.update.SupervisorSupervisorUpdateEntity, and homeassistant.components.hassio.update.SupervisorAddonUpdateEntity.

Definition at line 241 of file __init__.py.

◆ device_class()

UpdateDeviceClass | None homeassistant.components.update.UpdateEntity.device_class (   self)
Return the class of this entity.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 258 of file __init__.py.

◆ display_precision()

int homeassistant.components.update.UpdateEntity.display_precision (   self)
Return number of decimal digits for display of update progress.

Definition at line 267 of file __init__.py.

◆ entity_category()

EntityCategory | None homeassistant.components.update.UpdateEntity.entity_category (   self)
Return the category of the entity, if any.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 276 of file __init__.py.

◆ entity_picture()

str | None homeassistant.components.update.UpdateEntity.entity_picture (   self)

◆ in_progress()

◆ install()

None homeassistant.components.update.UpdateEntity.install (   self,
str | None  version,
bool  backup,
**Any  kwargs 
)
Install an update.

Version can be specified to install a specific version. When `None`, the
latest version needs to be installed.

The backup parameter indicates a backup should be taken before
installing the update.

Reimplemented in homeassistant.components.plex.update.PlexUpdate.

Definition at line 392 of file __init__.py.

◆ installed_version()

str | None homeassistant.components.update.UpdateEntity.installed_version (   self)
Version installed and in use.

Reimplemented in homeassistant.components.zha.update.ZHAFirmwareUpdateEntity, homeassistant.components.wled.update.WLEDUpdateEntity, homeassistant.components.tessie.update.TessieUpdateEntity, homeassistant.components.system_bridge.update.SystemBridgeUpdateEntity, homeassistant.components.synology_dsm.update.SynoDSMUpdateEntity, homeassistant.components.smlight.update.SmUpdateEntity, homeassistant.components.shelly.update.RpcSleepingUpdateEntity, homeassistant.components.shelly.update.RpcUpdateEntity, homeassistant.components.shelly.update.RestUpdateEntity, homeassistant.components.sensibo.update.SensiboDeviceUpdate, homeassistant.components.reolink.update.ReolinkUpdateBaseEntity, homeassistant.components.pi_hole.update.PiHoleUpdateEntity, homeassistant.components.nextcloud.update.NextcloudUpdateSensor, homeassistant.components.netgear.update.NetgearUpdateEntity, homeassistant.components.myuplink.update.MyUplinkDeviceUpdate, homeassistant.components.litterrobot.update.RobotUpdateEntity, homeassistant.components.lamarzocco.update.LaMarzoccoUpdateEntity, homeassistant.components.iron_os.update.IronOSUpdate, homeassistant.components.hassio.update.SupervisorCoreUpdateEntity, homeassistant.components.hassio.update.SupervisorSupervisorUpdateEntity, homeassistant.components.hassio.update.SupervisorOSUpdateEntity, homeassistant.components.hassio.update.SupervisorAddonUpdateEntity, homeassistant.components.fritz.update.FritzBoxUpdateEntity, homeassistant.components.ezviz.update.EzvizUpdateEntity, homeassistant.components.esphome.update.ESPHomeUpdateEntity, homeassistant.components.devolo_home_network.update.DevoloUpdateEntity, homeassistant.components.airgradient.update.AirGradientUpdate, and homeassistant.components.advantage_air.update.AdvantageAirApp.

Definition at line 246 of file __init__.py.

◆ latest_version()

str | None homeassistant.components.update.UpdateEntity.latest_version (   self)
Latest version available for install.

Reimplemented in homeassistant.components.zha.update.ZHAFirmwareUpdateEntity, homeassistant.components.wled.update.WLEDUpdateEntity, homeassistant.components.tessie.update.TessieUpdateEntity, homeassistant.components.system_bridge.update.SystemBridgeUpdateEntity, homeassistant.components.synology_dsm.update.SynoDSMUpdateEntity, homeassistant.components.smlight.update.SmUpdateEntity, homeassistant.components.shelly.update.RpcSleepingUpdateEntity, homeassistant.components.shelly.update.RpcUpdateEntity, homeassistant.components.shelly.update.RestUpdateEntity, homeassistant.components.sensibo.update.SensiboDeviceUpdate, homeassistant.components.reolink.update.ReolinkUpdateBaseEntity, homeassistant.components.pi_hole.update.PiHoleUpdateEntity, homeassistant.components.nextcloud.update.NextcloudUpdateSensor, homeassistant.components.netgear.update.NetgearUpdateEntity, homeassistant.components.myuplink.update.MyUplinkDeviceUpdate, homeassistant.components.lamarzocco.update.LaMarzoccoUpdateEntity, homeassistant.components.iron_os.update.IronOSUpdate, homeassistant.components.hassio.update.SupervisorCoreUpdateEntity, homeassistant.components.hassio.update.SupervisorSupervisorUpdateEntity, homeassistant.components.hassio.update.SupervisorOSUpdateEntity, homeassistant.components.hassio.update.SupervisorAddonUpdateEntity, homeassistant.components.fritz.update.FritzBoxUpdateEntity, homeassistant.components.ezviz.update.EzvizUpdateEntity, homeassistant.components.esphome.update.ESPHomeUpdateEntity, homeassistant.components.devolo_home_network.update.DevoloUpdateEntity, and homeassistant.components.advantage_air.update.AdvantageAirApp.

Definition at line 308 of file __init__.py.

◆ release_notes()

str | None homeassistant.components.update.UpdateEntity.release_notes (   self)
Return full release notes.

This is suitable for a long changelog that does not fit in the release_summary
property. The returned string can contain markdown.

Reimplemented in homeassistant.components.tplink_omada.update.OmadaDeviceUpdate, homeassistant.components.smlight.update.SmUpdateEntity, homeassistant.components.plex.update.PlexUpdate, homeassistant.components.ezviz.update.EzvizUpdateEntity, and homeassistant.components.demo.update.DemoUpdate.

Definition at line 411 of file __init__.py.

◆ release_summary()

str | None homeassistant.components.update.UpdateEntity.release_summary (   self)
Summary of the release notes or changelog.

This is not suitable for long changelogs, but merely suitable
for a short excerpt update description of max 255 characters.

Reimplemented in homeassistant.components.zha.update.ZHAFirmwareUpdateEntity, homeassistant.components.netgear.update.NetgearUpdateEntity, homeassistant.components.hassio.update.SupervisorAddonUpdateEntity, and homeassistant.components.esphome.update.ESPHomeUpdateEntity.

Definition at line 313 of file __init__.py.

◆ release_url()

◆ state()

str | None homeassistant.components.update.UpdateEntity.state (   self)
Return the entity state.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 426 of file __init__.py.

◆ state_attributes()

dict[str, Any] | None homeassistant.components.update.UpdateEntity.state_attributes (   self)
Return state attributes.

Reimplemented from homeassistant.helpers.entity.Entity.

Definition at line 447 of file __init__.py.

◆ supported_features()

UpdateEntityFeature homeassistant.components.update.UpdateEntity.supported_features (   self)

◆ supported_features_compat()

UpdateEntityFeature homeassistant.components.update.UpdateEntity.supported_features_compat (   self)
Return the supported features as UpdateEntityFeature.

Remove this compatibility shim in 2025.1 or later.

Definition at line 341 of file __init__.py.

◆ title()

str | None homeassistant.components.update.UpdateEntity.title (   self)
Title of the software.

This helps to differentiate between the device or entity name
versus the title of the software installed.

Reimplemented in homeassistant.components.iron_os.update.IronOSUpdate, homeassistant.components.hassio.update.SupervisorAddonUpdateEntity, and homeassistant.components.esphome.update.ESPHomeUpdateEntity.

Definition at line 332 of file __init__.py.

◆ update_percentage()

int | float | None homeassistant.components.update.UpdateEntity.update_percentage (   self)

◆ version_is_newer()

bool homeassistant.components.update.UpdateEntity.version_is_newer (   self,
str  latest_version,
str  installed_version 
)
Return True if latest_version is newer than installed_version.

Reimplemented in homeassistant.components.shelly.update.RestUpdateEntity, and homeassistant.components.reolink.update.ReolinkUpdateBaseEntity.

Definition at line 419 of file __init__.py.

Member Data Documentation

◆ __in_progress

homeassistant.components.update.UpdateEntity.__in_progress
private

Definition at line 498 of file __init__.py.

◆ __skipped_version

homeassistant.components.update.UpdateEntity.__skipped_version
private

Definition at line 370 of file __init__.py.

◆ _attr_in_progress

homeassistant.components.update.UpdateEntity._attr_in_progress
private

Definition at line 505 of file __init__.py.

◆ _entity_component_unrecorded_attributes

homeassistant.components.update.UpdateEntity._entity_component_unrecorded_attributes
staticprivate
Initial value:
= frozenset(
{
ATTR_DISPLAY_PRECISION,
ATTR_ENTITY_PICTURE,
ATTR_IN_PROGRESS,
ATTR_RELEASE_SUMMARY,
ATTR_UPDATE_PERCENTAGE,
}
)

Definition at line 214 of file __init__.py.

◆ bool

homeassistant.components.update.UpdateEntity.bool
static

Definition at line 225 of file __init__.py.

◆ installed_version

homeassistant.components.update.UpdateEntity.installed_version

Definition at line 368 of file __init__.py.

◆ int

homeassistant.components.update.UpdateEntity.int
static

Definition at line 229 of file __init__.py.

◆ None

homeassistant.components.update.UpdateEntity.None
static

Definition at line 226 of file __init__.py.

◆ UpdateEntityFeature

homeassistant.components.update.UpdateEntity.UpdateEntityFeature
static

Definition at line 234 of file __init__.py.


The documentation for this class was generated from the following file: