⚠️ IMPORTANT: Integration RenamedThis integration was previously called "Simple cURL" (domain:
simple_curl). It has been renamed to "Simple HTTP Client" (domain:simple_http_client).If you're upgrading from version v1.0.0:
For HACS users:
- Remove from
configuration.yaml:simple_curl:(if present)- Restart Home Assistant to disable the old integration
- In HACS → Integrations, find "Simple cURL" and remove it
- Remove old repository:
https://github.com/storm1er/ha-simple-curl- Add repository:
https://github.com/storm1er/ha-simple-http-client- Download "Simple HTTP Client"
- Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration → search for "Simple HTTP Client"
- Update all service calls:
simple_curl.fetch→simple_http_client.fetchFor manual installation users:
- Delete
custom_components/simple_curl/folder- Download and extract to
custom_components/simple_http_client/- Remove from
configuration.yaml:simple_curl:(if present)- Restart Home Assistant
- Go to Settings → Devices & Services → Add Integration → search for "Simple HTTP Client"
- Update all service calls:
simple_curl.fetch→simple_http_client.fetch
A lightweight Home Assistant integration that provides a simple service to fetch URLs with custom HTTP methods and headers. The response is returned as a variable that can be used directly in your automations and scripts.
Unlike the built-in rest integration which requires YAML configuration and creates sensors, Simple HTTP Client provides a callable service that:
- Works directly in automations and scripts without any configuration
- Returns data as variables using Home Assistant's
response_variablefeature - Supports all HTTP methods (GET, POST, PUT, PATCH, DELETE, etc.)
- Handles custom headers and request bodies
- Provides complete response data (status, content, headers)
Perfect for one-off API calls, webhooks, or dynamic URL fetching where you don't need persistent sensors.
- Open HACS in Home Assistant
- Click the three dots (⋮) in the top right → Custom repositories
- Add this repository URL:
https://github.com/storm1er/ha-simple-http-client - Select category: Integration
- Click Add
- Find "Simple HTTP Client" in HACS and click Download
- Restart Home Assistant
- Go to Settings → Devices & Services
- Click Add Integration (bottom right)
- Search for "Simple HTTP Client" and add it
- Download the latest release from the releases page
- Extract and copy the
custom_components/simple_http_clientfolder to your Home Assistantcustom_componentsdirectory - Restart Home Assistant
- Go to Settings → Devices & Services
- Click Add Integration (bottom right)
- Search for "Simple HTTP Client" and add it
Note: No configuration.yaml entry is required. The integration is added through the UI.
After adding the integration through the UI:
- Go to Settings → Devices & Services
- Verify "Simple HTTP Client" appears in your integrations list
- Go to Developer Tools → Services
- Search for
simple_http_client.fetch - If the service appears, installation was successful!
Alternatively, check the logs at Settings → System → Logs for:
Simple HTTP Client integration loaded successfully
| Parameter | Required | Default | Description |
|---|---|---|---|
url |
Yes | - | The URL to fetch |
method |
No | GET |
HTTP method (GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS) |
headers |
No | {} |
HTTP headers as key-value pairs |
body |
No | - | Request body content (for POST, PUT, PATCH) |
timeout |
No | 10 |
Request timeout in seconds |
The service returns a dictionary with the following fields:
status: HTTP status code (integer)content: Response body as text (string)headers: Response headers (dictionary)error: Error message if request failed (string, only present on error)
Use the response_variable parameter to capture the response data in your automations.
automation:
- alias: "Fetch API Data"
trigger:
- platform: time
at: "09:00:00"
action:
- service: simple_http_client.fetch
data:
url: "https://api.example.com/data"
response_variable: api_response
- service: notify.notify
data:
message: "API returned: {{ api_response.content }}"script:
post_to_api:
sequence:
- service: simple_http_client.fetch
data:
url: "https://api.example.com/endpoint"
method: "POST"
headers:
Authorization: "Bearer {{ states('input_text.api_token') }}"
Content-Type: "application/json"
body: '{"temperature": {{ states("sensor.temperature") }}}'
response_variable: result
- service: persistent_notification.create
data:
title: "API Response"
message: "Status: {{ result.status }}, Response: {{ result.content }}"automation:
- alias: "Fetch Weather Data"
trigger:
- platform: time_pattern
hours: "/1"
action:
- service: simple_http_client.fetch
data:
url: "https://api.weather.example.com/current"
headers:
Accept: "application/json"
response_variable: weather
- variables:
weather_data: "{{ weather.content | from_json }}"
- service: input_text.set_value
target:
entity_id: input_text.current_temp
data:
value: "{{ weather_data.temperature }}"automation:
- alias: "Check API Status"
trigger:
- platform: state
entity_id: input_boolean.check_api
to: "on"
action:
- service: simple_http_client.fetch
data:
url: "https://api.example.com/status"
timeout: 5
response_variable: api_status
- if:
- condition: template
value_template: "{{ api_status.status == 200 }}"
then:
- service: light.turn_on
target:
entity_id: light.status_indicator
data:
rgb_color: [0, 255, 0]
else:
- service: light.turn_on
target:
entity_id: light.status_indicator
data:
rgb_color: [255, 0, 0]automation:
- alias: "Fetch with Error Handling"
trigger:
- platform: time_pattern
minutes: "/15"
action:
- service: simple_http_client.fetch
data:
url: "https://api.example.com/data"
timeout: 10
response_variable: response
- if:
- condition: template
value_template: "{{ 'error' in response }}"
then:
- service: persistent_notification.create
data:
title: "API Error"
message: "Failed to fetch data: {{ response.error }}"
else:
- service: logbook.log
data:
name: "API Success"
message: "Fetched successfully with status {{ response.status }}"script:
fetch_device_status:
sequence:
- service: simple_http_client.fetch
data:
url: "http://{{ states('input_text.device_ip') }}/api/status"
headers:
X-API-Key: "{{ states('input_text.device_api_key') }}"
response_variable: device_data
- service: notify.notify
data:
message: "Device status: {{ device_data.content }}"- Response Content Format: The response
contentis always returned as text. For JSON APIs, use thefrom_jsonfilter to parse it. - Error Handling: Network errors, timeouts, and connection failures are caught and returned in the
errorfield instead of raising exceptions. - Status Code
0: Indicates a network or connection error (not a valid HTTP response). - Timeout: Default is 10 seconds. Adjust based on your API's expected response time.
- Security: Be careful not to log sensitive data like API keys or tokens. Use secrets for sensitive information.
If the simple_http_client.fetch service doesn't appear:
- Verify integration is added: Go to Settings → Devices & Services and check if "Simple HTTP Client" is listed
- Add the integration: If not listed, click Add Integration and search for "Simple HTTP Client"
- Verify installation: Confirm the integration files are in
custom_components/simple_http_client/ - Check logs: Go to Settings → System → Logs and search for "simple_http_client" errors
- Restart Home Assistant: Sometimes a restart is needed after adding the integration
Common issues:
- Integration not added through UI - Make sure to add it via Settings → Devices & Services → Add Integration
- Files not in correct location - Must be in
custom_components/simple_http_client/ - Cache issues - Try clearing your browser cache and restarting Home Assistant
- Check the URL is accessible from your Home Assistant instance
- Verify headers and authentication are correct
- Increase the
timeoutif the API is slow to respond - Check Home Assistant logs for detailed error messages
- Some APIs return empty bodies for certain status codes (204, 304, etc.)
- Check
response.statusto understand what the server returned - Verify the API endpoint is correct
Contributions are welcome! Please read CONTRIBUTING.md for details on submitting pull requests, reporting issues, or publishing this integration to HACS.
This project is licensed under the MIT License - see the LICENSE file for details.
If you find this integration useful, consider:
- Starring the repository on GitHub
- Reporting issues or suggesting features via GitHub Issues
- Contributing improvements via pull requests
Built for Home Assistant 2026.* and later, using the modern response_variable service pattern.