Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.time_date.sensor Namespace Reference

Classes

class  TimeDateSensor
 

Functions

None async_setup_entry (HomeAssistant hass, ConfigEntry entry, AddEntitiesCallback async_add_entities)
 
None async_setup_platform (HomeAssistant hass, ConfigType config, AddEntitiesCallback async_add_entities, DiscoveryInfoType|None discovery_info=None)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 PLATFORM_SCHEMA
 
string TIME_STR_FORMAT = "%H:%M"
 

Detailed Description

Support for showing the date and the time.

Function Documentation

◆ async_setup_entry()

None homeassistant.components.time_date.sensor.async_setup_entry ( HomeAssistant  hass,
ConfigEntry  entry,
AddEntitiesCallback   async_add_entities 
)
Set up the Time & Date sensor.

Definition at line 58 of file sensor.py.

◆ async_setup_platform()

None homeassistant.components.time_date.sensor.async_setup_platform ( HomeAssistant  hass,
ConfigType  config,
AddEntitiesCallback  async_add_entities,
DiscoveryInfoType | None   discovery_info = None 
)
Set up the Time and Date sensor.

Definition at line 42 of file sensor.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.time_date.sensor._LOGGER = logging.getLogger(__name__)
private

Definition at line 28 of file sensor.py.

◆ PLATFORM_SCHEMA

homeassistant.components.time_date.sensor.PLATFORM_SCHEMA
Initial value:
1 = SENSOR_PLATFORM_SCHEMA.extend(
2  {
3  vol.Optional(CONF_DISPLAY_OPTIONS, default=["time"]): vol.All(
4  cv.ensure_list, [vol.In(OPTION_TYPES)]
5  )
6  }
7 )

Definition at line 33 of file sensor.py.

◆ TIME_STR_FORMAT

string homeassistant.components.time_date.sensor.TIME_STR_FORMAT = "%H:%M"

Definition at line 30 of file sensor.py.