I’m trying to send a notification to everyone in the home. We’ve got some Android users and some iOS users. For the Android users, I’d like to use some HTML in the message. For the iOS users, I’d like that to be omitted (since it’s not supported).
Is there any way to do this while still using notification groups?
configuration.yaml
:
notify:
- name: ALL_DEVICES
platform: group
services:
- service: mobile_app_pixel
- service: mobile_app_iphone
Script:
alias: AQI Notification
mode: single
sequence:
- alias: Send notification
service: notify.ALL_DEVICES
data:
title: AQI Alert
message: >
AQI is <span style="color: {{ states("sensor.aqi_color") }}">{{
states("sensor.aqi_string") }} <b>{{ states("sensor.aqi") }}</b></span>.
data:
color: "{{ states(\"sensor.aqi_color\") }}"
channel: Air Quality
tag: aqi-alert