https://github.com/bramstroker/homeassistant-state-webhook
Custom Home Assistant component to push state changes to webhooks
https://github.com/bramstroker/homeassistant-state-webhook
home-assistant integration webhook
Last synced: 8 months ago
JSON representation
Custom Home Assistant component to push state changes to webhooks
- Host: GitHub
- URL: https://github.com/bramstroker/homeassistant-state-webhook
- Owner: bramstroker
- License: mit
- Created: 2024-12-18T13:01:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-23T10:46:24.000Z (over 1 year ago)
- Last Synced: 2025-04-07T15:35:13.664Z (about 1 year ago)
- Topics: home-assistant, integration, webhook
- Language: Python
- Homepage:
- Size: 230 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


[](https://github.com/hacs/integration)
[](https://mypy-lang.org/)
[](https://coveralls.io/github/bramstroker/homeassistant-state-webhook?branch=main)
[](https://www.buymeacoffee.com/bramski)
# State webhook
Custom Home Assistant integration which allows you to sent state changes of entities to a webhook (HTTP call).
Essentially you set up a webhook URL, with optionally authorization headers.
In addition you configure the entities which you want to track and which data to include in the payload.
The component will listen to state changes of relevant entities and will call your webhook accordingly.
You can use it for example to sent HA state data to tools like [Zapier](https://zapier.com/) or [IFTT](https://ifttt.com/) to do all kind of automations.
Or sent JSON data to any custom endpoint, the possibilities are endless.
## Installation
### HACS (manually)
Currently you'll need to add this integration as a custom repository in HACS.
I will try to add this integration to HACS default repository, but this will take a lot of time looking at the big backlog.
- Click the button below to open this repository in HACS:
[](https://my.home-assistant.io/redirect/hacs_repository/?owner=bramstroker&repository=homeassistant-state-webhook&category=integration)
- Click add and then the download button in the bottom right corner.
- Restart Home Assistant and continue with the next section.
## Usage
For each webhook you'd like to add go to "Devices & services", and click "Add integration", search for `State webhook` and follow the instructions.
Or click the button below.
[](https://my.home-assistant.io/redirect/config_flow_start/?domain=state_webhook)
configuration screens:


## Payload
Currently the component will sent following payload structure using POST request to the configured endpoint:
```json
{
"entity_id": "person.some",
"time": "2024-12-19T12:27:05.854243+00:00",
"old_state": "home",
"new_state": "not_home"
}
```
You can also add the `new_state_attributes` using a toggle in the configuration screen.
And omit the `old_state` if you don't need it.