-
Notifications
You must be signed in to change notification settings - Fork 2
automation sms notification
GitHub Action edited this page Jul 20, 2026
·
3 revisions
Forward incoming SMS messages from your GL.iNet router to Home Assistant as persistent notifications.
Source: SMS-Notification.yaml
- Polls for SMS every 30 seconds using a time pattern trigger.
- Calls
glinet_router.get_smsto fetch all messages from the router. - Filters to incoming messages only.
- For each message, creates a persistent notification showing the sender's phone number and message text.
- Removes the processed message from the router via
glinet_router.remove_sms.
- Copy the YAML below.
- In Home Assistant, go to Settings → Automations & Scenes → + Create Automation → Create new automation.
- Open the automation menu (⋮) in the top-right and select Edit in YAML.
- Paste the copied YAML, replacing any existing content.
- Save.
alias: test
description: ""
triggers:
- seconds: "30"
trigger: time_pattern
conditions: []
actions:
- response_variable: sms_data
action: glinet_router.get_sms
- repeat:
for_each: >-
{{ sms_data.messages | selectattr('direction', 'eq', 'incoming') | list
}}
sequence:
- data:
title: 📱 {{ repeat.item.phone_number }}
message: "{{ repeat.item.text }}"
data:
notification_id: sms_{{ repeat.item.id }}
action: notify.persistent_notification
- data:
scope: 10
message_id: "{{ repeat.item.id }}"
action: glinet_router.remove_sms
enabled: true
mode: single- Automation Templates — Index of available automation templates.
- SMS — SMS feature reference.