Home Assistant
Home Assistant can publish to a Pinglet topic with nothing but built-in integrations. It’s useful when the people who should get an alert don’t run the Home Assistant companion app: Pinglet subscribers just open a share link, with no account and no HA access.
RESTful notify (simple)
Add a RESTful notify service to configuration.yaml:
notify:
- name: pinglet
platform: rest
resource: https://pinglet.dev/acme/home
method: POST_JSON
headers:
Authorization: !secret pinglet_auth
title_param_name: title
message_param_name: message
And in secrets.yaml:
pinglet_auth: Bearer pinglet_<your key>
Replace acme/home with your namespace and preferred topic name. The topic is created on the first notification. Restart, then use it from any automation:
automation:
- alias: "Washing machine finished"
trigger:
- platform: state
entity_id: sensor.washing_machine
to: "idle"
action:
- service: notify.pinglet
data:
title: "Washing machine"
message: "Cycle finished. Go empty it"
Subscribe to the topic in the Pinglet app using the share link from your dashboard.
rest_command (full control)
The notify platform sends title and message only. To set level and priority per call (say, an urgent water-leak alert that breaks through DND), use a rest_command with a templated payload:
rest_command:
pinglet:
url: https://pinglet.dev/acme/home
method: post
content_type: application/json
headers:
Authorization: !secret pinglet_auth
payload: >-
{"title": {{ title | tojson }},
"message": {{ message | tojson }},
"level": {{ level | default('info') | tojson }},
"priority": {{ priority | default('normal') | tojson }}}
action:
- service: rest_command.pinglet
data:
title: "Water leak"
message: "Leak sensor wet under the kitchen sink"
level: "error"
priority: "urgent"
Reserve
urgentfor things that need a human now. It’s the difference between a notification and being woken up. The full field set (badges, metadata) is in Message anatomy.
Via Apprise
Home Assistant also ships an Apprise integration, and Pinglet is a native Apprise service since Apprise v1.13.0. Once your Home Assistant release bundles that version, this works too:
notify:
- name: pinglet
platform: apprise
url: "pinglets://pinglet_<your key>@pinglet.dev/acme/home"