Automate a smart plug to Turn on/off camera within time period

Hey guys, i just got Home assistant setup, the main reason i got it is just to get this automation to work. i appreciate if someone can help me with that.

I have a smart plug (zigbee) that connected to a camera, The automation i want is as follow:

  1. the camera switch is ON , from 7.45 am to 10.15 pm, OFF at other time
  2. If im not home i want the camera switch to be ON all time, and disregard the rule 1)
  3. if i come home , i want it to get back to rule 1)

i spent two days trying to get HA working and now i dont know the trigger , conditions, actions, or state logic to do this . Appreciate it.

Okay i might have figured it out, i created 3 separate automations.

  1. Trigger: Iam not_home , conditon :none, action: turn on camera

2)trigger: Iam home, time at 7.46 am, condition: if time is after 7.45 and before 10.15pm, action: turn on camera

  1. trigger: iam home, time at 10.16 pm, conditon: time after 10.15 pm and before 7.45 am , Iam home, action: turn off camera

What you guys think ?

Nopeā€¦
Trigger: not: home.
not_home means not in any zone which is confusing (at best).

If you instead say anything but home (not home ( not the same as not_home)) then it will work.