Several Homematic Thermostats - How to start

Hi all,

I have in every room one homematic thermostat running. For now configured in my CCU2. Timewise for each room. I have now setup HA on a Linux Ubuntu. Homemeatic is already linked/connected to HA.

What my plan is:
I want to set the temperature for each thermostat seperately by time.
E.g. Living Room, from 09:00h to 12:00h 20 degrees, from 12:00h to 22:00h 23 degrees, and the rest of the day 14 degrees. But it should just heat while I am at home. When I am not at home, ALL heater should go to 14 degrees.

I have an Iphone and the device tracker is also setup and configurred.

How shall I start?
Create automation and configure eacht thermostat for the heating period, with the trigger, that it just heat when I am at home?
How can I put all thermostats at one shot to 14 degrees when the trigger recognized, that I have left home?

Thanks and maybe sorry for the stupid question, but I have just started with HA.

Cheers HamburgJoe