Selection Rules¶
Several transport options use Selection Rules which allow a flexible set of inclusion or exclusion values, which can be plain text or regular expressions.
Options Using Selection Rules¶
data_keys_selectdevice_area_selectdevice_label_selectdevice_manufacturer_selectdevice_os_selectdevice_model_selecttarget_select
See Options Table for description and where these can be used.
Rule Definitions¶
A more complex case is filtering nested mappings, common in Home Assistant YAML and JSON. When exclude is a mapping, a null value excludes that key; a dict value keeps the key but recurses into it with the same tree logic:
Advanced Exclusion
options:
data_keys_select:
exclude:
data: # descend into `data`
attachment: # exclude `attachment` from `data`
video: # exclude `video` from `data`
media: # descend into `data.media`
url: # exclude `url` from `data.media`
Named sub-filter — any non-reserved key in the config dict is a full data_keys_select config applied recursively to that key's value:
options:
data_keys_select:
include: [message, data] # top-level include
data: # sub-filter for `data`
include: [attachment, push]
Both forms can be combined freely and nest to any depth.