Frequently Asked Questions¶
Target Selection¶
Q: If I define a label_id and an area_id, and in that area I have 3 devices, is the label_id treated as an AND? (so it will send to just devices in label_id that have label_id), or an OR, (so it sends to all devices that are in area_id, as well as all devices in the system that have label_id?)
A: It works as an OR selector - give me all everything that is in area X OR has label Y, so all the area_id,floor_id and label targets all add up to one big list. This is part of the standard Home Assistant target selectors which happens outside of Supernotify, and works the same for all integrations.
Q: How do I send a notification to only 3 of my Alexa speakers and not the rest.
A: There are a few ways of doing this
Option 1 - Use the Home Assistant Target Selector on the supernotify.notify action to pick the speakers by their Area, Floor or Label.
Option 2 - Create a separate Delivery (YAML only at present) for these speakers, and list them as targets. Then when setting up notifications, pick this delivery from the list.
alexa_inform:
alias: Ask all the Alexas apart from bedrooms to speak the notification
transport: alexa_devices
target:
- notify.kitchen_alexa_speak
- notify.living_room_flex_speak
- notify.studio_speak
Scenarios¶
Q: My Christmas scenario changes the chime_tune on my chime_person delivery, but now the Christmas chime plays for other notifications too, such as when Home Assistant restarts. Why?
A: The scenario's enabled setting for that delivery is switching it on, so it's added to every notification while the scenario applies, rather than only changing it when something else has picked it. Each delivery in a scenario's delivery section can say one of three things:
enabled: true, or noenabledat all - switch this delivery on for every notification while the scenario appliesenabled: false- switch this delivery offenabled:with nothing after it - change this delivery only when it has already been picked, otherwise leave it alone
To only change the tune, leave enabled empty:
scenarios:
xmas:
alias: Christmas season
conditions:
- "{{ (12,1) <= (now().month, now().day) <= (12,31) }}"
delivery:
chime_person:
enabled:
data:
chime_tune: xmas_person
It's also worth checking the scenario's conditions. Under condition: or, any one condition is enough on its own, so adding something like "the alarm is disarmed" alongside the dates makes the scenario apply all year whenever the alarm is off. Put the date conditions in their own or, inside an and with the rest:
conditions:
condition: and
conditions:
- condition: or
conditions:
- "{{ (12,1) <= (now().month, now().day) <= (12,31) }}"
- "{{ (1,1) <= (now().month, now().day) <= (1,7) }}"
- condition: state
entity_id: alarm_control_panel.home_alarm_control
state: [disarmed, armed_home]
At startup, Supernotify logs an INFO message naming the deliveries that each scenario switches on. The supernotify.enquire_deliveries_by_scenario action shows, for each scenario, which deliveries it switches on (enabled), switches off (disabled) and changes (applies). See Overriding Delivery Selection and Configuration, and the Seasonal Greetings recipe for a ready-made Christmas package.