Dynamically actionable push notifications

Hi

I am familiair with making an actionable push notification. Is there any possibility to make an automation with a more flexible way for the actions?
For instance; when making an automation to check for each lamp if it is turned on when leaving the home and send a push notification that the lamp is still on. All this can be done dynamically with trigger.to_state in the push notify, but when including an action for this lamp to be able to turn it off I can not use the triggered lamp and attach the action to turn it off.

Ideally you should create one automation and include all lamp switched in it and create a single iOS action in the push notify to turn of the triggered switch.

Thanks