Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.notify.legacy.BaseNotificationService Class Reference

Public Member Functions

None async_register_services (self)
 
None async_send_message (self, str message, **Any kwargs)
 
None async_setup (self, HomeAssistant hass, str service_name, str target_service_name_prefix)
 
None async_unregister_services (self)
 
None send_message (self, str message, **Any kwargs)
 
Mapping[str, Any]|None targets (self)
 

Public Attributes

 hass
 
 registered_targets
 
 services_dict
 

Static Public Attributes

 HomeAssistant
 

Private Member Functions

None _async_notify_message_service (self, ServiceCall service)
 

Private Attributes

 _service_name
 
 _target_service_name_prefix
 

Detailed Description

An abstract class for notification services.

Definition at line 209 of file legacy.py.

Member Function Documentation

◆ _async_notify_message_service()

None homeassistant.components.notify.legacy.BaseNotificationService._async_notify_message_service (   self,
ServiceCall  service 
)
private
Handle sending notification message service calls.

Definition at line 240 of file legacy.py.

◆ async_register_services()

None homeassistant.components.notify.legacy.BaseNotificationService.async_register_services (   self)
Create or update the notify services.

Definition at line 278 of file legacy.py.

◆ async_send_message()

None homeassistant.components.notify.legacy.BaseNotificationService.async_send_message (   self,
str  message,
**Any  kwargs 
)
Send a message.

kwargs can contain ATTR_TITLE to specify a title.

Definition at line 231 of file legacy.py.

◆ async_setup()

None homeassistant.components.notify.legacy.BaseNotificationService.async_setup (   self,
HomeAssistant  hass,
str  service_name,
str  target_service_name_prefix 
)
Store the data for the notify service.

Definition at line 258 of file legacy.py.

◆ async_unregister_services()

None homeassistant.components.notify.legacy.BaseNotificationService.async_unregister_services (   self)
Unregister the notify services.

Definition at line 337 of file legacy.py.

◆ send_message()

None homeassistant.components.notify.legacy.BaseNotificationService.send_message (   self,
str  message,
**Any  kwargs 
)
Send a message.

kwargs can contain ATTR_TITLE to specify a title.

Definition at line 224 of file legacy.py.

◆ targets()

Mapping[str, Any] | None homeassistant.components.notify.legacy.BaseNotificationService.targets (   self)
Return a dictionary of registered targets.

Definition at line 220 of file legacy.py.

Member Data Documentation

◆ _service_name

homeassistant.components.notify.legacy.BaseNotificationService._service_name
private

Definition at line 267 of file legacy.py.

◆ _target_service_name_prefix

homeassistant.components.notify.legacy.BaseNotificationService._target_service_name_prefix
private

Definition at line 268 of file legacy.py.

◆ hass

homeassistant.components.notify.legacy.BaseNotificationService.hass

Definition at line 266 of file legacy.py.

◆ HomeAssistant

homeassistant.components.notify.legacy.BaseNotificationService.HomeAssistant
static

Definition at line 214 of file legacy.py.

◆ registered_targets

homeassistant.components.notify.legacy.BaseNotificationService.registered_targets

Definition at line 269 of file legacy.py.

◆ services_dict

homeassistant.components.notify.legacy.BaseNotificationService.services_dict

Definition at line 274 of file legacy.py.


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