I have a few sensor and the associated switch entity_ids in the following format: sensor.microwave_power / switch.microwave
sensor.coffee_machine_power / switch.coffee_machine
etc.
I want a trigger to fire when the power usage numerical_state is above 1500
The trigger’s action should then switch off the relevant outlet.
Your template to transform the entity_id looks fine. What about it doesn’t work? Does the automation never trigger? Does it trigger but you get errors? Perhaps share a trace from a failed automation run.