Setup Samsung Monitor Turn On / Off Automatically?

Hello,

So I have a Samsung Smart Monitor which should turn on during the Weekdays at 7:00 and off at 16:00. Outside of these times it shouldnt run. On the weekend it shouldnt run at all.

To accomplish this, I have following automations:

alias: Turn On
description: “”
trigger:

  • platform: time
    at: “07:00:00”
    condition:
  • condition: time
    weekday:
    • mon
    • tue
    • wed
    • thu
    • fri
      action:
  • service: media_player.turn_on
    data: {}
    target:
    entity_id: media_player.43_smart_monitor_m7
    mode: single

alias: Turn off
description: “”
trigger:

  • platform: state
    entity_id:
    • media_player.43_smart_monitor_m7
      from: “Off”
      to: “On”
  • platform: time
    at: “16:00:00”
    condition:
  • condition: or
    conditions:
    • condition: time
      after: “16:00:00”
    • condition: time
      before: “07:00:00”
  • condition: state
    entity_id: media_player.43_smart_monitor_m7
    state: “On”
    for:
    hours: 0
    minutes: 0
    seconds: 10
    action:
  • repeat:
    until:
    - condition: state
    entity_id: media_player.43_smart_monitor_m7
    state: “off”
    for:
    hours: 0
    minutes: 0
    seconds: 10
    sequence:
    - service: media_player.turn_off
    data: {}
    target:
    entity_id: media_player.43_smart_monitor_m7
    - delay:
    hours: 0
    minutes: 0
    seconds: 11
    milliseconds: 0
    mode: single

I have this repeat until loop with the delay because it takes a couple of seconds until the device actually turns off, so I set this to 10 seconds. I dont know if that works though.

Technically, the Monitor should turn off automatically after 9 Hours by itself (set in Samsung Menu).

For whatever reason, its more or less turned on all the time. It turns off at 16 but turns on again at 17:33.

This is the last History. Keep in Mind its been on over the Weekend which it should never do.