this post was submitted on 26 Mar 2024
22 points (100.0% liked)

homeassistant

14807 readers
20 users here now

Home Assistant is open source home automation that puts local control and privacy first.
Powered by a worldwide community of tinkerers and DIY enthusiasts.

Home Assistant can be self-installed on ProxMox, Raspberry Pi, or even purchased pre-installed: Home Assistant: Installation

Discussion of Home-Assistant adjacent topics is absolutely fine, within reason.
If you're not sure, DM @GreatAlbatross@feddit.uk

founded 2 years ago
MODERATORS
 

Hi, all. My wife and I recently got new phones, and it got me thinking again about how notifications work.

Currently I have several automations (maybe 10) that send notifications to my phone, her phone, both, and possibly other devices.

But when we get a new phone, or replace a tablet, etc., I have to update every single one of those automations. And I inevitably forget some or introduce errors.

Is there a better way to do this? For example, it'd be nice if I could abstract the concept of "my phone" out in those automations, then I'd only have to change the device "my phone" in one place, rather than a bunch of places.

Any thoughts on this? Maybe I'm missing a way to do it. Thanks.

you are viewing a single comment's thread
view the rest of the comments
[โ€“] mojo17@lemmy.world 5 points 1 year ago* (last edited 1 year ago) (1 children)

I use the notify service with a group platform. This way you add and remove devices in one place only. Here's how I set it up in configuration.yaml:

notify:
  - name: notify_all_devices
    platform: group
    services:
      - service: mobile_app_pixel_6_pro
      - service: mobile_app_pixel_3_xl

In my automation triggers, I simply call my notify_all_devices service.

[โ€“] limelight79@lemm.ee 1 points 1 year ago

Thank you! I will look into this!