I have 100+ temperature sensors.
There are 3 kind of alerts I can configure for each of these sensors (Heater, Cooler, Freezer).
I use drop down entity that has the same entity name as the sensor to set the kind of alarm I want (Heater, cooler, Freezer).
I don’t want to create 3 automations for each sensor I have. So I try to add every sensor in one automation, but it needs to trigger only if the input_select of the triggered sensor is set to a specific state. (I dont want a Cooler to be triggered by freezer temperatures).
Now I can only set the condition section to a specific sensor. I would like it to be set dynamically to fit the entity name of the triggered sensor like this :
condition:
- condition: state
entity_id: input_select.{{ trigger.to_state.name }}
state: Cooler
But it dosent work.
I’m a beginner, but I really want to be able to set 3 different kinds of alarm on each 100+ sensor without needing to create 300+ automations…
Since you’ve already set up triggers related to each type, you can just give your trigger an ID that matches the type you need it to match from the Input select to send the notification.
The following assumes that the entity IDs follow a set convention wherein sensor.1046_temperature goes with input_select.1046_temperature.
mmm… not sure to understand. Tried it but it doesn’t works.
Here are the conditions I try to do :
IF (the temperature of any temperature sensor is below 2 OR above 25) AND that the dropdown list corresponding to the same number as the triggered temperature sensor is “cooler”.
THEN send me a notification with the sensor number, it’s temperature and the dropdown list state.