#Sensors state automation

33 messages · Page 1 of 1 (latest)

willow swallow
#

I need to trigger an automation whenever one of 5 sensors values states changes. each sensor has 6 different values. looking for an elegant way to implement it

rustic locust
#

What does "each sensor has 6 different values" mean exactly?

#

While waiting for your answer.
There is a helper that does the job.

Go to Devices and Services, Helper tab
Create new helper > Group > Sensor Group and select Last as type.

#

Your new sensor will update every time the child sensor update.

#

Then automate on it

rustic locust
#

Then what I propose should work....

#

I am wondering if it's the most elegant solutions 🤔

#

Actually.... Scratch that.
You can skip the helper altogher.
Just trigger your automation on state change of each of your entities

#

You can have as many trigger as you wish on a single automation.

willow swallow
#

Yeah...I'm looking for a shroter way if possible

rustic locust
#

Define shorter.

#
platform: state
entity_id:
  - sensor.1
  - sensor.2
  - sensor.3

Is pretty short in my book

willow swallow
#

Sensor = device with 6 entities

sacred wagon
#

You can still do the same thing

#

can you show us what you think is long?

rustic locust
#

Yeah ...

#

Maybe explain what you want to achieve, we could help you more

#

☺️

willow swallow
#

When using helper: ADD Group, I need to select 30 entities of 5 different devices. I thought I can define automation according to device state level and not entities state. ok...I will do it the hard way 🙂 my intention is to send MQTT message to my control4 controller in order to flag if sensors are connected to the network meaning "alive"

#

Thanks....

rustic locust
#

There is indeed no way to circumvent triggering on your entities as of today

#

But you actually do not need the group

#

Just trigger on your entities

sacred wagon
#

I have a PR in the works that allows templates to trigger automations

#

that would essentially solve this

rustic locust
#

What i'd love *We're thinking about it) is label trigger.

#

Trigger on everything that has this label.

#

In fact.... target trigger

sacred wagon
#

yah, that's the intention

#

well, 1 intention

#

but templates needs some other love before that can happen