Hello everyone,
I would like to simplify some of my automations, so I would like to use wildcards, if possible.
So I would like to create entity wildcards.
Current code:
automation:
- alias: Shelly Overpowering or Overheating
id: shelly_overpowering_or_overheating
description: ''
trigger:
platform: state
entity_id:
- binary_sensor.ambient_light_dr_overheating
- binary_sensor.ambient_light_dr_overpowering
- binary_sensor.ambient_light_l_dr_overpowering
- binary_sensor.ambient_light_lr_overpowering
- binary_sensor.ambient_light_r_dr_overpowering
- binary_sensor.boiler_1_overheating
- binary_sensor.boiler_1_overpowering
- binary_sensor.boiler_2_overheating
- binary_sensor.boiler_2_overpowering
- binary_sensor.boiler_3_overheating
- binary_sensor.boiler_3_overpowering
- binary_sensor.lightswitch_dr_overheating
- binary_sensor.lightswitch_lr_overheating
- binary_sensor.main_light_dr_overpowering
- binary_sensor.main_light_lr_overpowering
- binary_sensor.av_socket_top_lr_overpowering
- binary_sensor.av_socket_bottom_lr_overpowering
- binary_sensor.av_socket_lr_overheating
from: 'off'
to: 'on'
condition: []
action:
- service: notify.mobile_app_sm_g975f
data:
...
Target code, which should have wildcards
automation:
- alias: Shelly Overpowering or Overheating
id: shelly_overpowering_or_overheating
description: ''
trigger:
platform: state
entity_id:
- binary_sensor.*overheating # wildcard 1
- binary_sensor.*overpowering # wildcard 2
from: 'off'
to: 'on'
...
Is this possible directly in automations? I could not find anything in the documentation.
Thank you for your help
Alex