The new version bring a deeper integration into Home Assistant. You can now register #Home-Dashboard as a Mobile App and allow sending notification to your device. No additional custom component required.
To enable this feature, please follow these 3 easy steps
Go to Settings and enable Push Notification, Home-Dashboard will register new app within Home Assistant, just click Restart Home Assistant when the registration.
Home-Dashboard registered device will appear as a Mobile App, you can send notification directly into the device without additional custom component.
A notification with picture will appear in your device.
First, we need to create folder www inside config if you don't already have one.
config/www
Then edit configuration.yaml by adding the following line to enable Home Assistant write file into www folder:
homeassistant:
allowlist_external_dirs:
- /config/www
Add notify.ALL_DEVICES service: (Replace mobile_app_hdb_12345678 with your registered device name)
notify:
- name: ALL_DEVICES
platform: group
services:
- service: mobile_app_hdb_12345678
- service: mobile_app_hdb_23456789
- service: mobile_app_hdb_34567890
Send a simple notification when the light turned on
automation:
- alias: Notification Light Turned On
trigger:
- entity_id: light.light_1
platform: state
to: "on
action:
- service: notify.ALL_DEVICES
data:
title: Simple Notification
message: Light Turned On
Send a notification with image whenever garage door is opened (Replace http://home-dashboard.duckdns.org:8123/local/camera_1.jpg with your own data)
automation:
- alias: 'Notify when garage door opened'
trigger:
- entity_id: cover.garage_door
platform: state
to: "open"
action:
- data_template:
entity_id: camera.camera_1
filename: /config/www/camera_1.jpg
service: camera.snapshot
- delay:
seconds: 1
- data_template:
title: Garage Door
message: Opened
data:
image: http://home-dashboard.duckdns.org:8123/local/camera_1.jpg
service: notify.ALL_DEVICES
- Make sure you have default_config: in configuration.yaml
- If you don't, add this line to configuration.yaml and restart Home Assistant
mobile_app:
https://developers.home-assistant.io/docs/api/native-app-integration/