Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin Class Reference
Inheritance diagram for homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin:
[legend]
Collaboration diagram for homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin:
[legend]

Public Member Functions

None __init__ (self, HomeAssistant hass, DiscoveryInfoType discovery_data, str|None device_id, ConfigEntry config_entry, str log_name)
 
None async_discovery_update (self, MQTTDiscoveryPayload discovery_payload)
 
None async_tear_down (self)
 
None async_update (self, MQTTDiscoveryPayload discovery_data)
 

Public Attributes

 hass
 
 log_name
 

Private Member Functions

None _async_device_removed (self, Event[EventDeviceRegistryUpdatedData] event)
 
None _async_tear_down (self)
 
None _entry_unload (self, *Any _)
 

Private Attributes

 _config_entry
 
 _config_entry_id
 
 _device_id
 
 _discovery_data
 
 _migrate_discovery
 
 _remove_device_updated
 
 _remove_discovery_updated
 
 _skip_device_removal
 

Detailed Description

Add support for auto discovery for platforms without an entity.

Definition at line 657 of file entity.py.

Constructor & Destructor Documentation

◆ __init__()

None homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin.__init__ (   self,
HomeAssistant  hass,
DiscoveryInfoType  discovery_data,
str | None  device_id,
ConfigEntry  config_entry,
str  log_name 
)
Initialize the update service.

Definition at line 660 of file entity.py.

Member Function Documentation

◆ _async_device_removed()

None homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._async_device_removed (   self,
Event[EventDeviceRegistryUpdatedData]   event 
)
private
Handle the manual removal of a device.

Definition at line 836 of file entity.py.

◆ _async_tear_down()

None homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._async_tear_down (   self)
private
Handle the cleanup of the discovery service.

Definition at line 855 of file entity.py.

◆ _entry_unload()

None homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._entry_unload (   self,
*Any  _ 
)
private
Handle cleanup when the config entry is unloaded.

Definition at line 698 of file entity.py.

◆ async_discovery_update()

None homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin.async_discovery_update (   self,
MQTTDiscoveryPayload  discovery_payload 
)
Handle discovery update.

Definition at line 705 of file entity.py.

◆ async_tear_down()

None homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin.async_tear_down (   self)
Handle the cleanup of platform specific parts, extend to the platform.

Reimplemented in homeassistant.components.mqtt.tag.MQTTTagScanner, and homeassistant.components.mqtt.device_trigger.MqttDeviceTrigger.

Definition at line 872 of file entity.py.

◆ async_update()

None homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin.async_update (   self,
MQTTDiscoveryPayload  discovery_data 
)
Handle the update of platform specific parts, extend to the platform.

Reimplemented in homeassistant.components.mqtt.tag.MQTTTagScanner, and homeassistant.components.mqtt.device_trigger.MqttDeviceTrigger.

Definition at line 868 of file entity.py.

Member Data Documentation

◆ _config_entry

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._config_entry
private

Definition at line 675 of file entity.py.

◆ _config_entry_id

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._config_entry_id
private

Definition at line 676 of file entity.py.

◆ _device_id

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._device_id
private

Definition at line 674 of file entity.py.

◆ _discovery_data

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._discovery_data
private

Definition at line 673 of file entity.py.

◆ _migrate_discovery

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._migrate_discovery
private
Handle discovery update.

Definition at line 719 of file entity.py.

◆ _remove_device_updated

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._remove_device_updated
private

Definition at line 688 of file entity.py.

◆ _remove_discovery_updated

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._remove_discovery_updated
private

Definition at line 681 of file entity.py.

◆ _skip_device_removal

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin._skip_device_removal
private
Handle the manual removal of a device.
Handle the cleanup of the discovery service.

Definition at line 846 of file entity.py.

◆ hass

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin.hass
Initialize the update service.

Definition at line 670 of file entity.py.

◆ log_name

homeassistant.components.mqtt.entity.MqttDiscoveryDeviceUpdateMixin.log_name

Definition at line 671 of file entity.py.


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