Available Native Functions
execute_service
Call any Home Assistant service with specified parameters.The domain of the service (e.g.,
light, switch, climate)The service to call (e.g.,
turn_on, turn_off, set_temperature)Service data object with the following properties:
entity_id(string): Target entity IDdevice_id(string): Target device ID (optional)area_id(string): Target area ID (optional)
Example Configuration
Example Configuration
Control Home Assistant devices and services:
add_automation
Create Home Assistant automations dynamically through conversation.Automation configuration in valid YAML format. Newline characters should be
\n.Setup Recommendations
Setup Recommendations
- Create a separate assistant for automation creation to avoid accidental automation registration
- Set up event notifications to monitor created automations
- Review automations before enabling them in production
Create Separate Assistant
Notify on Created
Example Configuration
Example Configuration
English Configuration:Korean Configuration:For Korean language, use 
\\n instead of \n for newline characters:get_history
Retrieve historical state data for specified entities.List of entity IDs to retrieve history for
Start of the history period in
%Y-%m-%dT%H:%M:%S%z format. Defaults to 1 day before the request time.End of the history period in
%Y-%m-%dT%H:%M:%S%z format. Defaults to current time.Only return
last_changed and state for non-first/last states. Default: trueSkip returning attributes from the database. Default:
trueOnly return significant state changes. Default:
trueExample Configuration
Example Configuration
Retrieve historical state data for entities. For advanced formatting with templates, see the composite function example.
get_energy
Retrieve energy configuration and preferences from Home Assistant’s energy management system.This function returns the energy dashboard configuration including solar, grid, battery, and gas sources. No parameters required.
Example Configuration
Example Configuration
Retrieve energy management configuration:
get_statistics
Retrieve statistical data for specified entities over a time period.List of statistic IDs to retrieve data for
Start of the statistics period in
%Y-%m-%dT%H:%M:%S%z formatEnd of the statistics period in
%Y-%m-%dT%H:%M:%S%z formatAggregation period. Options:
5minute, hour, day, month. Default: dayUnit conversion configuration (optional)
Types of statistics to return. Default:
["change"]Example Configuration
Example Configuration
Retrieve statistical data for energy consumption or other long-term statistics:
Use Cases
Control Devices
Use
execute_service to control lights, switches, and other devicesCreate Automations
Use
add_automation to create automations through conversationAnalyze History
Use
get_history to analyze entity state changes over timeEnergy Monitoring
Use
get_energy to retrieve energy dashboard configurationStatistical Analysis
Use
get_statistics for long-term statistical data and trendsMonitor Events
Combine functions to create monitoring and notification workflows