New User and Need help understanding templates

New to HA and new to doing any sort of programming. I started this project a few days ago and have completed alot and now I want to learn templates but having issues understand the. If someone could help with a few test projects to help me understand I would be grateful.

I have 3 items I want to track info from
Nest Tempature
3 Devices GPS
Wemo Light switches

I have google home and I simply want it to speak the variable for me. I have tts.google_say working great (Few examples. )
When any device comes home to send a message to notification with what device entered the home zone.
Push message at 5pm with the current temperature of the NEST
When any light switch turns on in my house send notification with what light switch switched to on

I think once I understand how to right for these 3 objects I will be able to learn and figure out more. Just need somewhere to start.

So i figured out how to send the NEST temperature

Just need help with sending info on what switch was triggered. I am using the MQTT Custom ALARM. When in Armed away mode if a light switch is triggered then alarm actives and I get a message. However I dont know what light switch was pressed.