RESTful Notifications
The rest
notification platform allows you to deliver RESTful
To enable the REST notification in your installation, add the following to your configuration.yaml
The configuration.yaml file is the main configuration file for Home Assistant. It lists the integrations to be loaded and their specific configurations. In some cases, the configuration needs to be edited manually directly in the configuration.yaml file. Most integrations can be configured in the UI. [Learn more] file:
# Example configuration.yaml entry
notify:
- name: NOTIFIER_NAME
platform: rest
resource: http://IP_ADDRESS/ENDPOINT
Configuration Variables
Setting the optional parameter name
allows multiple notifiers to be created. The notifier will bind to the notify.NOTIFIER_NAME
action.
The method of the request. Valid options are GET
, POST
or POST_JSON
.
Template dictionary of extra parameters to send to the resource.
To use notifications, please see the getting started with automation page.
Using templates
For incoming data, a value template translates incoming JSON or raw data to a valid payload.
Incoming payloads are rendered with possible JSON values, so when rendering, the value_json
can be used to access the attributes in a JSON based payload, otherwise the value
variable can be used for non-json based data.
Additional, the this
can be used as variables in the template. The this
attribute refers to the current entity state of the entity.
Further information about this
variable can be found in the template documentation
Example value template with json:
With given payload:
{ "state": "ON", "temperature": 21.902 }
Template {{ value_json.temperature | round(1) }}
renders to 21.9
.