Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.button Namespace Reference

Namespaces

 const
 
 device_action
 
 device_trigger
 

Classes

class  ButtonDeviceClass
 
class  ButtonEntity
 
class  ButtonEntityDescription
 

Functions

bool async_setup (HomeAssistant hass, ConfigType config)
 
bool async_setup_entry (HomeAssistant hass, ConfigEntry entry)
 
bool async_unload_entry (HomeAssistant hass, ConfigEntry entry)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
dictionary CACHED_PROPERTIES_WITH_ATTR_
 
 DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.Coerce(ButtonDeviceClass))
 
string ENTITY_ID_FORMAT = DOMAIN + ".{}"
 
 MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)
 
 PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA
 
 PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE
 
 SCAN_INTERVAL = timedelta(seconds=30)
 

Detailed Description

Component to pressing a button as platforms.

Function Documentation

◆ async_setup()

bool homeassistant.components.button.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up Button entities.

Definition at line 50 of file __init__.py.

◆ async_setup_entry()

bool homeassistant.components.button.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Set up a config entry.

Definition at line 66 of file __init__.py.

◆ async_unload_entry()

bool homeassistant.components.button.async_unload_entry ( HomeAssistant  hass,
ConfigEntry  entry 
)
Unload a config entry.

Definition at line 71 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.button._LOGGER = logging.getLogger(__name__)
private

Definition at line 26 of file __init__.py.

◆ CACHED_PROPERTIES_WITH_ATTR_

dictionary homeassistant.components.button.CACHED_PROPERTIES_WITH_ATTR_
Initial value:
1 = {
2  "device_class",
3 }

Definition at line 82 of file __init__.py.

◆ DEVICE_CLASSES_SCHEMA

homeassistant.components.button.DEVICE_CLASSES_SCHEMA = vol.All(vol.Lower, vol.Coerce(ButtonDeviceClass))

Definition at line 45 of file __init__.py.

◆ ENTITY_ID_FORMAT

string homeassistant.components.button.ENTITY_ID_FORMAT = DOMAIN + ".{}"

Definition at line 29 of file __init__.py.

◆ MIN_TIME_BETWEEN_SCANS

homeassistant.components.button.MIN_TIME_BETWEEN_SCANS = timedelta(seconds=10)

Definition at line 34 of file __init__.py.

◆ PLATFORM_SCHEMA

homeassistant.components.button.PLATFORM_SCHEMA = cv.PLATFORM_SCHEMA

Definition at line 30 of file __init__.py.

◆ PLATFORM_SCHEMA_BASE

homeassistant.components.button.PLATFORM_SCHEMA_BASE = cv.PLATFORM_SCHEMA_BASE

Definition at line 31 of file __init__.py.

◆ SCAN_INTERVAL

homeassistant.components.button.SCAN_INTERVAL = timedelta(seconds=30)

Definition at line 32 of file __init__.py.