Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.lametric.services Namespace Reference

Functions

None async_send_notification (LaMetricDataUpdateCoordinator coordinator, ServiceCall call, list[Chart|Goal|Simple] frames)
 
None async_setup_services (HomeAssistant hass)
 

Variables

 SERVICE_BASE_SCHEMA
 
 SERVICE_CHART_SCHEMA
 
 SERVICE_MESSAGE_SCHEMA
 

Detailed Description

Support for LaMetric time services.

Function Documentation

◆ async_send_notification()

None homeassistant.components.lametric.services.async_send_notification ( LaMetricDataUpdateCoordinator  coordinator,
ServiceCall  call,
list[Chart | Goal | Simple]  frames 
)
Send a notification to an LaMetric device.

Definition at line 113 of file services.py.

◆ async_setup_services()

None homeassistant.components.lametric.services.async_setup_services ( HomeAssistant  hass)
Set up services for the LaMetric integration.

Definition at line 70 of file services.py.

Variable Documentation

◆ SERVICE_BASE_SCHEMA

homeassistant.components.lametric.services.SERVICE_BASE_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  vol.Required(CONF_DEVICE_ID): cv.string,
4  vol.Optional(CONF_CYCLES, default=1): cv.positive_int,
5  vol.Optional(CONF_ICON_TYPE, default=NotificationIconType.NONE): vol.Coerce(
6  NotificationIconType
7  ),
8  vol.Optional(CONF_PRIORITY, default=NotificationPriority.INFO): vol.Coerce(
9  NotificationPriority
10  ),
11  vol.Optional(CONF_SOUND): vol.Any(
12  vol.Coerce(AlarmSound), vol.Coerce(NotificationSound)
13  ),
14  }
15 )

Definition at line 39 of file services.py.

◆ SERVICE_CHART_SCHEMA

homeassistant.components.lametric.services.SERVICE_CHART_SCHEMA
Initial value:
1 = SERVICE_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_DATA): vol.All(cv.ensure_list, [vol.Coerce(int)]),
4  }
5 )

Definition at line 62 of file services.py.

◆ SERVICE_MESSAGE_SCHEMA

homeassistant.components.lametric.services.SERVICE_MESSAGE_SCHEMA
Initial value:
1 = SERVICE_BASE_SCHEMA.extend(
2  {
3  vol.Required(CONF_MESSAGE): cv.string,
4  vol.Optional(CONF_ICON): cv.string,
5  }
6 )

Definition at line 55 of file services.py.