Trigger light when receiving Whatsapp Or Facebook Message?

Create an automation,
set a trigger to use the state of a device.
Set the entity to sensor.sm_a520f_last_notification
Set the attribute to: package
Set the To field to com.whatsapp
Set a trigger ID eg: whatsapp

Add another trigger doing the same thing, but this time setting To to the package name for Facebook Messenger. And again give it an ID eg facebook

Then in the actions, you can either set it to turn a light on. Or if you have coloured LEDs, you can use choose and set the first choose condition to trigger, and choose whatsapp. Then you can set the colour of the light to eg green. And the second choose option, use trigger, facebook. Then set the light to turn on with for example blue or purple.

That’s pretty much it.

2 Likes