Want to use condition, but not very good with coding

Dear all,

I have raspberry running HA, with zigbee dongle, to handle sensors and some lights.
My problem is, that i want to introduce condition, where automation does not turn off my lights in case
aquara cube is on specific side.
i cant do that in UI. (idea is simple, i have set that sensors read light and once it gets darker it turns on lights for me if it senses movement, and once there is no movement after 3 min it turns it out, conditions now, TV playing, and i want to add that if i turn them on with cube it does not turn it off.)
I have checked in developers tools, state never changes for cube


So i need help, maybe it is possible in code, code for current automation is:

- id: '1614685294740'
  alias: izsledz gaismas viesistaba
  description: ''
  trigger:
  - type: no_motion
    platform: device
    device_id: 832ec15fb3ad1b77f7c5549d384ead57
    entity_id: binary_sensor.lumi_lumi_sensor_motion_aq2_ias_zone
    domain: binary_sensor
    for:
      hours: 0
      minutes: 3
      seconds: 0
      milliseconds: 0
  condition:
  - condition: state
    entity_id: media_player.living_room_tv_2
    state: 'off'
  action:
  - type: turn_off
    device_id: ec6bf0558f35c54ae71289659cafaaf9
    entity_id: light.signify_netherlands_b_v_lwa009_level_on_off
    domain: light
  - type: turn_off
    device_id: b4542fd744a294663067070052240b54
    entity_id: light.signify_netherlands_b_v_lwa009_85e3d908_level_on_off
    domain: light
  mode: single

This is created from UI, to turn on lights when cube is on specific sides, maybe that helps:

- id: '1635972511911'
  alias: viesistaba cube iesledz/izsledz
  description: ''
  use_blueprint:
    path: brent/zha-aqara-magic-cube-57-actions.yaml
    input:
      remote: 7deab647e8e0324541b31ebf0d6f4dff
      cube_flip_1:
      - scene: scene.viesistaba_100
      cube_flip_6:
      - type: turn_off
        device_id: ec6bf0558f35c54ae71289659cafaaf9
        entity_id: light.signify_netherlands_b_v_lwa009_level_on_off
        domain: light
      - type: turn_off
        device_id: b4542fd744a294663067070052240b54
        entity_id: light.signify_netherlands_b_v_lwa009_85e3d908_level_on_off
        domain: light
      flip_any: true
      cube_flip_2: []