### Get Home Assistant Device States Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieve the current states of all devices connected to Home Assistant. This example shows how to access the first state. ```r ha_get_states()[[1]] ``` -------------------------------- ### Install ha Package from GitHub Source: https://context7.com/christopherkenny/ha/llms.txt Install the ha package directly from GitHub using the pak package manager. ```r pak::pak('christopherkenny/ha') ``` -------------------------------- ### GET /api/config Source: https://context7.com/christopherkenny/ha/llms.txt Retrieves the current Home Assistant configuration. ```APIDOC ## GET /api/config ### Description Retrieves the current Home Assistant configuration including location, units, and component information. ### Method GET ### Endpoint /api/config ### Response #### Success Response (200) - **location_name** (string) - The name of the home location. - **latitude** (number) - Latitude of the instance. - **unit_system** (list) - Configuration for length and temperature units. - **version** (string) - Home Assistant version. ``` -------------------------------- ### GET /api/ Source: https://context7.com/christopherkenny/ha/llms.txt Verifies that the Home Assistant API is running and accessible. ```APIDOC ## GET /api/ ### Description Verifies that the Home Assistant API is running and accessible with your credentials. ### Method GET ### Endpoint /api/ ### Parameters #### Query Parameters - **ip** (string) - Optional - The IP address of the remote Home Assistant instance. ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating the API is running. ``` -------------------------------- ### Get Services Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves a list of available services. ```APIDOC ## GET /api/services ### Description Retrieves a list of available services. ### Method GET ### Endpoint /api/services ``` -------------------------------- ### Load the Home Assistant R package Source: https://github.com/christopherkenny/ha/blob/main/README.md Load the 'ha' package to interact with Home Assistant. Ensure the package is installed. ```r library(ha) ``` -------------------------------- ### Get All States Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves all entity states. ```APIDOC ## GET /api/states ### Description Retrieves all entity states. ### Method GET ### Endpoint /api/states ``` -------------------------------- ### Set Home Assistant API Key Source: https://github.com/christopherkenny/ha/blob/main/README.md Configure your long-lived access token obtained from Home Assistant. Set install to TRUE to automatically configure. ```r ha_set_key('YOUR_LONG_LIVED_ACCESS_TOKEN', install = TRUE) ``` -------------------------------- ### Get Events Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves a list of events. ```APIDOC ## GET /api/events ### Description Retrieves a list of events. ### Method GET ### Endpoint /api/events ``` -------------------------------- ### Get Base API Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves the base API endpoint. ```APIDOC ## GET / ### Description Retrieves the base API endpoint. ### Method GET ### Endpoint /api/ ``` -------------------------------- ### Get Calendars Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves a list of calendars. ```APIDOC ## GET /api/calendars ### Description Retrieves a list of calendars. ### Method GET ### Endpoint /api/calendars ``` -------------------------------- ### Get Error Log Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves the error log. ```APIDOC ## GET /api/error_log ### Description Retrieves the error log. ### Method GET ### Endpoint /api/error_log ``` -------------------------------- ### Set Home Assistant Access Token Source: https://context7.com/christopherkenny/ha/llms.txt Configure the long-lived access token for authenticating with the Home Assistant API. The token can be set for the current session, installed to .Renviron for persistence, or overwrite an existing token. A custom .Renviron path can also be specified. ```r library(ha) # Set key for current session only ha_set_key('your_long_lived_access_token') # Set key and install to .Renviron for persistence ha_set_key('your_long_lived_access_token', install = TRUE) # Overwrite existing key in .Renviron ha_set_key('new_access_token', install = TRUE, overwrite = TRUE) # Specify custom .Renviron path ha_set_key('your_token', install = TRUE, r_env = '~/.Renviron') ``` -------------------------------- ### Get Logbook Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves logbook entries for a given timestamp. ```APIDOC ## GET /api/logbook/ ### Description Retrieves logbook entries for a given timestamp. ### Method GET ### Endpoint /api/logbook/ ### Parameters #### Path Parameters - **timestamp** (string) - Required - The timestamp for logbook entries. ``` -------------------------------- ### GET /api/states Source: https://context7.com/christopherkenny/ha/llms.txt Retrieves the current state of all entities or a specific entity. ```APIDOC ## GET /api/states ### Description Retrieves the current state of all entities or a specific entity from Home Assistant. ### Method GET ### Endpoint /api/states ### Parameters #### Query Parameters - **entity_id** (string) - Optional - The specific entity ID to query. - **ip** (string) - Optional - The IP address of the remote Home Assistant instance. ### Response #### Success Response (200) - **entity_id** (string) - The ID of the entity. - **state** (string) - The current state value. - **attributes** (list) - Additional metadata for the entity. ``` -------------------------------- ### Get Specific State Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves the state of a specific entity. ```APIDOC ## GET /api/states/ ### Description Retrieves the state of a specific entity. ### Method GET ### Endpoint /api/states/ ### Parameters #### Path Parameters - **entity_id** (string) - Required - The ID of the entity. ``` -------------------------------- ### Get History by Period Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves historical data for a given period. ```APIDOC ## GET /api/history/period/ ### Description Retrieves historical data for a given period. ### Method GET ### Endpoint /api/history/period/ ### Parameters #### Path Parameters - **timestamp** (string) - Required - The timestamp defining the period. ``` -------------------------------- ### Get Home Assistant Device States Source: https://context7.com/christopherkenny/ha/llms.txt Retrieve the current states of all entities or a specific entity from Home Assistant. You can query states for a particular entity ID, access its attributes, or query a remote instance. ```r # Get all device states all_states <- ha_get_states() # Access first device all_states[[1]]$entity_id #> [1] "update.home_assistant_supervisor_update" all_states[[1]]$state #> [1] "off" all_states[[1]]$attributes$friendly_name #> [1] "Home Assistant Supervisor Update" # Get state of a specific entity light_state <- ha_get_states(entity_id = 'light.living_room') light_state$state #> [1] "on" light_state$attributes$brightness #> [1] 255 # Query a remote Home Assistant instance ha_get_states(entity_id = 'sensor.temperature', ip = '192.168.1.100') ``` -------------------------------- ### Call a Home Assistant Service Source: https://context7.com/christopherkenny/ha/llms.txt Execute a specific service on a target entity to control devices or trigger actions within Home Assistant. Examples include turning lights on/off or toggling switches. ```r # Turn on a light ha_set_services( domain = 'light', service = 'turn_on', entity_id = 'light.living_room' ) #> [[1]] #> [[1]]$entity_id #> [1] "light.living_room" #> [[1]]$state #> [1] "on" # Turn off a light ha_set_services( domain = 'light', service = 'turn_off', entity_id = 'light.bedroom' ) # Toggle a switch ha_set_services( domain = 'switch', service = 'toggle', entity_id = 'switch.fan' ) ``` -------------------------------- ### Get Calendar Events Source: https://github.com/christopherkenny/ha/blob/main/README.md Retrieves events for a specific calendar within a time range. ```APIDOC ## GET /api/calendars/?start=&end= ### Description Retrieves events for a specific calendar within a time range. ### Method GET ### Endpoint /api/calendars/ ### Parameters #### Path Parameters - **calendar entity_id** (string) - Required - The entity ID of the calendar. #### Query Parameters - **start** (string) - Required - The start timestamp for the event range. - **end** (string) - Required - The end timestamp for the event range. ``` -------------------------------- ### Check Configuration Source: https://github.com/christopherkenny/ha/blob/main/README.md Checks the Home Assistant configuration. ```APIDOC ## POST /api/config/core/check_config ### Description Checks the Home Assistant configuration. ### Method POST ### Endpoint /api/config/core/check_config ``` -------------------------------- ### Handle Intent Source: https://github.com/christopherkenny/ha/blob/main/README.md Handles an intent. ```APIDOC ## POST /api/intent/handle ### Description Handles an intent. ### Method POST ### Endpoint /api/intent/handle ### Request Body - **text** (string) - Required - The text input for the intent. - **slots** (object) - Optional - Slots for the intent. ``` -------------------------------- ### Turn on a Light Service Source: https://github.com/christopherkenny/ha/blob/main/README.md Control a light entity by calling the 'turn_on' service. Specify the domain ('light') and the entity_id. ```r ha_set_services('light', 'turn_on', entity_id = 'light.h6076') ``` -------------------------------- ### Validate Home Assistant Configuration Files Source: https://context7.com/christopherkenny/ha/llms.txt Check the Home Assistant configuration files for any syntax errors or validation issues. The result indicates whether the configuration is valid and lists any errors found. ```r result <- ha_check_config() result$result #> [1] "valid" result$errors #> NULL ``` -------------------------------- ### Retrieve Home Assistant Configuration Source: https://context7.com/christopherkenny/ha/llms.txt Fetch the current Home Assistant configuration, including details like location, units of measurement, and component information. Specific configuration values can be accessed directly from the returned list. ```r config <- ha_get_config() # Access configuration values config$location_name #> [1] "Home" config$latitude #> [1] 40.7128 config$unit_system #> $length #> [1] "mi" #> $temperature #> [1] "°F" config$version #> [1] "2024.1.0" ``` -------------------------------- ### Render Jinja2 templates Source: https://context7.com/christopherkenny/ha/llms.txt Processes templates using the Home Assistant engine to generate dynamic strings. ```r # Simple state template ha_render_template("The living room light is {{ states('light.living_room') }}.") # Complex template with conditions ha_render_template(" {% if is_state('binary_sensor.motion', 'on') %} Motion detected! {% else %} All clear. {% endif %} ") # Template with attributes ha_render_template("Temperature: {{ state_attr('climate.thermostat', 'current_temperature') }}°F") ``` -------------------------------- ### List Available Services Source: https://context7.com/christopherkenny/ha/llms.txt Retrieve a list of all available services in Home Assistant, organized by their respective domains (e.g., light, switch, automation). This helps in discovering controllable services and their functions. ```r services <- ha_get_services() # Find light services light_services <- services[[which(sapply(services, function(x) x$domain == 'light'))]] light_services$domain #> [1] "light" names(light_services$services) #> [1] "turn_on" "turn_off" "toggle" ``` -------------------------------- ### Intents API Source: https://context7.com/christopherkenny/ha/llms.txt API for firing Home Assistant intents. ```APIDOC ## POST /api/intents ### Description Fires a Home Assistant intent for voice assistant integration. ### Method POST ### Endpoint /api/intents ### Parameters #### Request Body - **intent** (object) - Required - An object containing the intent name and data. - **name** (string) - Required - The name of the intent (e.g., 'SetTimer', 'HassLightSet'). - **data** (object) - Optional - Data payload for the intent. ### Request Example ```json { "intent": { "name": "SetTimer", "data": { "seconds": "30" } } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Intent SetTimer processed successfully." } ``` ``` -------------------------------- ### Check and Retrieve API Key Source: https://context7.com/christopherkenny/ha/llms.txt Verify if a Home Assistant API key is currently configured and retrieve its value. The retrieved key is returned invisibly. ```r # Check if key is set ha_has_key() #> [1] TRUE # Retrieve the current key (returned invisibly) key <- ha_get_key() ``` -------------------------------- ### Retrieve and view event types Source: https://context7.com/christopherkenny/ha/llms.txt Fetches all available event types from the Home Assistant instance. ```r events <- ha_get_events() # View available event types sapply(events[1:5], function(x) x$event) ``` -------------------------------- ### POST /api/services/{domain}/{service} Source: https://context7.com/christopherkenny/ha/llms.txt Calls a service on a specific entity. ```APIDOC ## POST /api/services/{domain}/{service} ### Description Calls a service on a specific entity to control devices. ### Method POST ### Endpoint /api/services/{domain}/{service} ### Parameters #### Path Parameters - **domain** (string) - Required - The domain of the service (e.g., light, switch). - **service** (string) - Required - The service name (e.g., turn_on, toggle). #### Request Body - **entity_id** (string) - Required - The entity ID to apply the service to. ### Response #### Success Response (200) - **entity_id** (string) - The ID of the entity affected. - **state** (string) - The resulting state of the entity. ``` -------------------------------- ### Camera Proxy Source: https://github.com/christopherkenny/ha/blob/main/README.md Proxies camera streams. ```APIDOC ## GET /api/camera_proxy/ ### Description Proxies camera streams. ### Method GET ### Endpoint /api/camera_proxy/ ### Parameters #### Path Parameters - **camera entity_id** (string) - Required - The entity ID of the camera. ``` -------------------------------- ### Render Template Source: https://github.com/christopherkenny/ha/blob/main/README.md Renders a template. ```APIDOC ## POST /api/template ### Description Renders a template. ### Method POST ### Endpoint /api/template ### Request Body - **template** (string) - Required - The template string to render. ``` -------------------------------- ### Retrieve error logs Source: https://context7.com/christopherkenny/ha/llms.txt Fetches the Home Assistant error log for debugging purposes. ```r error_log <- ha_get_error_log() # View log entries (returned as character vector split by newlines) head(error_log[[1]], 10) ``` -------------------------------- ### Set Event Source: https://github.com/christopherkenny/ha/blob/main/README.md Fires an event. ```APIDOC ## POST /api/events/ ### Description Fires an event. ### Method POST ### Endpoint /api/events/ ### Parameters #### Path Parameters - **event_type** (string) - Required - The type of event to fire. ### Request Body - **event_data** (object) - Optional - Data associated with the event. ``` -------------------------------- ### Retrieve calendar entities Source: https://context7.com/christopherkenny/ha/llms.txt Lists all calendar entities configured in Home Assistant. ```r calendars <- ha_get_calendars() calendars[[1]]$entity_id calendars[[1]]$name ``` -------------------------------- ### POST /api/states/{entity_id} Source: https://context7.com/christopherkenny/ha/llms.txt Creates or updates the state of an entity. ```APIDOC ## POST /api/states/{entity_id} ### Description Creates or updates the state of an entity in Home Assistant. ### Method POST ### Endpoint /api/states/{entity_id} ### Parameters #### Path Parameters - **entity_id** (string) - Required - The ID of the entity to update. #### Request Body - **state** (string) - Required - The new state value. - **attributes** (list) - Optional - Custom attributes to associate with the state. ### Response #### Success Response (200) - **entity_id** (string) - The ID of the updated entity. - **state** (string) - The updated state value. - **attributes** (list) - The updated attributes. ``` -------------------------------- ### Check Home Assistant API Connection Source: https://github.com/christopherkenny/ha/blob/main/README.md Verify that the API connection is established and running correctly by calling the ha_api() function. ```r ha_api() ``` -------------------------------- ### Retrieve logbook entries Source: https://context7.com/christopherkenny/ha/llms.txt Fetches logs of entity state changes and events. ```r # Get recent logbook entries logbook <- ha_get_logbook() logbook[[1]]$name logbook[[1]]$message logbook[[1]]$when # Get logbook entries from a specific time ha_get_logbook(timestamp = '2024-01-14T12:00:00') ``` -------------------------------- ### Events API Source: https://context7.com/christopherkenny/ha/llms.txt APIs for managing and firing events in Home Assistant. ```APIDOC ## GET /api/events ### Description Retrieves a list of all event types available in Home Assistant. ### Method GET ### Endpoint /api/events ### Response #### Success Response (200) - **event** (string) - The name of the event type. ### Response Example ```json [ { "event": "state_changed" }, { "event": "time_changed" }, { "event": "service_registered" }, { "event": "call_service" }, { "event": "component_loaded" } ] ``` ``` ```APIDOC ## POST /api/events ### Description Fires a custom event in Home Assistant with optional data payload. ### Method POST ### Endpoint /api/events ### Parameters #### Request Body - **event_type** (string) - Required - The type of the event to fire, e.g., 'custom.notification_sent'. - **event_data** (object) - Optional - A dictionary containing data payload for the event. ### Request Example ```json { "event_type": "custom.doorbell_pressed", "event_data": { "location": "front_door", "timestamp": "2024-01-15T14:30:00+00:00", "camera_snapshot": "/media/snapshot_001.jpg" } } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Event custom.doorbell_pressed fired." } ``` ``` -------------------------------- ### Trigger automation services Source: https://context7.com/christopherkenny/ha/llms.txt Executes a specific service for a given domain and entity. ```r ha_set_services( domain = 'automation', service = 'trigger', entity_id = 'automation.morning_routine' ) ``` -------------------------------- ### Templates API Source: https://context7.com/christopherkenny/ha/llms.txt API for rendering Jinja2 templates. ```APIDOC ## POST /api/template ### Description Renders a Jinja2 template using Home Assistant's template engine. ### Method POST ### Endpoint /api/template ### Parameters #### Request Body - **template** (string) - Required - The Jinja2 template string to render. ### Request Example ```json { "template": "The living room light is {{ states('light.living_room') }}." } ``` ### Response #### Success Response (200) - **result** (string) - The rendered template output. #### Response Example ```json { "result": "The living room light is on." } ``` ``` -------------------------------- ### Control Automation Source: https://context7.com/christopherkenny/ha/llms.txt Triggers an automation in Home Assistant. ```APIDOC ## POST /api/services/automation/trigger ### Description Triggers a specific automation in Home Assistant. ### Method POST ### Endpoint /api/services/automation/trigger ### Parameters #### Request Body - **domain** (string) - Required - The domain of the service, e.g., 'automation'. - **service** (string) - Required - The service to call, e.g., 'trigger'. - **entity_id** (string) - Required - The entity ID of the automation to trigger, e.g., 'automation.morning_routine'. ### Request Example ```json { "domain": "automation", "service": "trigger", "entity_id": "automation.morning_routine" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message. #### Response Example ```json { "message": "Automation automation.morning_routine triggered." } ``` ``` -------------------------------- ### Fire custom events Source: https://context7.com/christopherkenny/ha/llms.txt Fires events with optional data payloads to the Home Assistant event bus. ```r # Fire a simple event ha_set_event('custom.notification_sent') # Fire an event with data ha_set_event( event_type = 'custom.doorbell_pressed', event_data = list( location = 'front_door', timestamp = Sys.time(), camera_snapshot = '/media/snapshot_001.jpg' ) ) ``` -------------------------------- ### Set State Source: https://github.com/christopherkenny/ha/blob/main/README.md Sets the state of an entity. ```APIDOC ## POST /api/states/ ### Description Sets the state of an entity. ### Method POST ### Endpoint /api/states/ ### Parameters #### Path Parameters - **entity_id** (string) - Required - The ID of the entity to update. ### Request Body - **state** (string) - Required - The new state for the entity. - **attributes** (object) - Optional - Additional attributes to set for the entity. ``` -------------------------------- ### Verify Home Assistant API Accessibility Source: https://context7.com/christopherkenny/ha/llms.txt Check if the Home Assistant API is running and accessible using provided credentials. Supports checking both local instances and remote instances specified by IP address. ```r # Check local Home Assistant instance ha_api() #> $message #> [1] "API running." # Check remote Home Assistant instance by IP ha_api(ip = '192.168.1.100') #> $message #> [1] "API running." ``` -------------------------------- ### History and Logging API Source: https://context7.com/christopherkenny/ha/llms.txt APIs for retrieving historical state data and logbook entries. ```APIDOC ## GET /api/history ### Description Retrieves historical state data for a specific entity, optionally filtered by timestamp. ### Method GET ### Endpoint /api/history ### Parameters #### Query Parameters - **entity_id** (string) - Required - The entity ID to retrieve history for. - **timestamp** (string) - Optional - A timestamp to filter history from (ISO 8601 format). ### Response #### Success Response (200) - **state** (string) - The state of the entity. - **last_changed** (string) - The timestamp when the state last changed. ### Response Example ```json [ { "state": "72.5", "last_changed": "2024-01-15T10:30:00+00:00" } ] ``` ``` ```APIDOC ## GET /api/logbook ### Description Retrieves logbook entries showing entity state changes and events. ### Method GET ### Endpoint /api/logbook ### Parameters #### Query Parameters - **timestamp** (string) - Optional - A timestamp to filter logbook entries from (ISO 8601 format). ### Response #### Success Response (200) - **name** (string) - The name of the entity. - **message** (string) - The log message. - **when** (string) - The timestamp of the log entry. ### Response Example ```json [ { "name": "Living Room Light", "message": "turned on", "when": "2024-01-15T14:30:00+00:00" } ] ``` ``` ```APIDOC ## GET /api/error_log ### Description Retrieves the Home Assistant error log for debugging. ### Method GET ### Endpoint /api/error_log ### Response #### Success Response (200) - **log** (string) - The content of the error log, split by newlines. ### Response Example ```json { "log": [ "2024-01-15 10:00:00 WARNING (MainThread) [homeassistant.components.sensor]...", "2024-01-15 10:05:00 ERROR (MainThread) [homeassistant.core]..." ] } ``` ``` -------------------------------- ### Turn off a Light Service Source: https://github.com/christopherkenny/ha/blob/main/README.md Control a light entity by calling the 'turn_off' service. Specify the domain ('light') and the entity_id. ```r ha_set_services('light', 'turn_off', entity_id = 'light.h6076') ``` -------------------------------- ### Calendars API Source: https://context7.com/christopherkenny/ha/llms.txt API for retrieving calendar entities. ```APIDOC ## GET /api/calendars ### Description Retrieves a list of all calendar entities configured in Home Assistant. ### Method GET ### Endpoint /api/calendars ### Response #### Success Response (200) - **entity_id** (string) - The entity ID of the calendar. - **name** (string) - The name of the calendar. ### Response Example ```json [ { "entity_id": "calendar.family_calendar", "name": "Family Calendar" } ] ``` ``` -------------------------------- ### Fire voice assistant intents Source: https://context7.com/christopherkenny/ha/llms.txt Triggers intents for voice assistant integration; requires intents to be enabled in Home Assistant. ```r # Set a timer intent ha_set_intent( intent = list( name = 'SetTimer', data = list(seconds = '30') ) ) # Turn on light via intent ha_set_intent( intent = list( name = 'HassLightSet', data = list( name = 'living room', brightness_pct = 75 ) ) ) ``` -------------------------------- ### Call Service Source: https://github.com/christopherkenny/ha/blob/main/README.md Calls a specific service. ```APIDOC ## POST /api/services// ### Description Calls a specific service. ### Method POST ### Endpoint /api/services// ### Parameters #### Path Parameters - **domain** (string) - Required - The domain of the service. - **service** (string) - Required - The name of the service. ### Request Body - **service_data** (object) - Optional - Data required by the service. ``` -------------------------------- ### Set or Update Entity State Source: https://context7.com/christopherkenny/ha/llms.txt Create a new entity state or update the state of an existing entity in Home Assistant. This function can also set custom attributes along with the state. ```r # Set a simple state ha_set_states( entity_id = 'sensor.custom_sensor', state = 'active' ) # Set state with custom attributes result <- ha_set_states( entity_id = 'sensor.package_tracker', state = 'delivered', attributes = list( tracking_number = '1Z999AA10123456784', carrier = 'UPS', delivery_time = '2024-01-15T14:30:00' ) ) result$entity_id #> [1] "sensor.package_tracker" result$state #> [1] "delivered" result$attributes$carrier #> [1] "UPS" ``` -------------------------------- ### Retrieve historical state data Source: https://context7.com/christopherkenny/ha/llms.txt Fetches historical state entries for entities, optionally filtered by timestamp. ```r # Get recent history for an entity history <- ha_get_history(entity_id = 'sensor.temperature') # Access historical entries history[[1]][[1]]$state history[[1]][[1]]$last_changed # Get history from a specific timestamp ha_get_history( entity_id = 'light.living_room', timestamp = '2024-01-14T00:00:00' ) ``` -------------------------------- ### Delete Entity State Source: https://context7.com/christopherkenny/ha/llms.txt Remove an entity's state from Home Assistant. This is useful for cleaning up temporary or test entities. ```r # Create a temporary state ha_set_states('sensor.temp_test', 'testing') # Delete the state result <- ha_delete_states('sensor.temp_test') result$message #> [1] "State removed." ``` -------------------------------- ### Delete State Source: https://github.com/christopherkenny/ha/blob/main/README.md Deletes the state of an entity. ```APIDOC ## DELETE /api/states/ ### Description Deletes the state of an entity. ### Method DELETE ### Endpoint /api/states/ ### Parameters #### Path Parameters - **entity_id** (string) - Required - The ID of the entity to delete. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.